I am trying to reinitialize object positions in my scene by changing translation parameter. But the scene gets created in createScene() function and then after reset always starts at the same positions. I want to be able to change positions of object randomly after every reset, any suggestions?
Scene File: link
The MechanicalObject class has functions that apply the *initial* transform to an object: applyTranslation and applyRotation. Combined with the various getObject functions from the BaseObject class, you should be able to enumerate all MechanicalObjects in your scene and customize their initial positions before you step the simulation for the first time.
With best regards,
You must be logged in to reply to this topic.
Get involved in this forum: