Dear all,
I would like to add texture to boxes spawned in the NRP state machine.
Somehow I can not make this work with the new
NRP version on Ubuntu 18.04. I created a script
repeated.material which is calling the texture
checkerboard.png. Here the script:
material RepeatedTexture
{
technique
{
pass
{
texture_unit
{
// Relative to the location of the material script
texture …/textures/checkerboard.png
// Repeat the texture over the surface (4 per face)
scale 0.5 0.5
}
}
}
}
In the state machine I define the box like this:
# Creates box object at random position
smach.StateMachine.add('set_object_position', states.SpawnBox(model_name=model_name_function,size=(1,1,2),position=position_value_function,can_collide= False, gravity_factor= False,color='RepeatedTexture'),
transitions = {'succeeded': 'check_runs', 'aborted': 'ACTION_ERROR', 'preempted': 'ACTION_PREEMPTED'})
Where do I have to add the script and texture and do I have to recompile anything to make this work?
Thanks a lot and best regards,
Thorben