So I’m moving kinematic rigidbodies via scripting and I want their velocity to be set appropriately as they move. Right now, if they touch other physics objects, they should influence them after touching/give them momentum, but I can’t get it to work.
When I try to set the velocity value in the script that moves the object, I get the following error:
Actor::setLinearVelocity: Actor must be (non-kinematic) dynamic!
Which seems to be a PhysX error, but also kind of bullshit, since the only other understandable solution to this issue (kinematic rigidbodies automatically adjust their velocity with changes in position) doesn’t seem to be the case.
I can think of other ways to get around this issue, but by far the BEST solution would be to just have the rigidbody’s velocity value work correctly.
How can I get this to work?
I have been trying to accomplish something similar. The traditional definition of kinematic is an object with a inverse inertia tensor of 0 (i.e. infinite mass). This is fairly easy to implement in a physics solver, and velocity can be trivially taken into account. Emulating it with a very heavy object whose position and velocity are set in fixed update should be a possibility, but for me this seems to kill performance. David Wu
– Photogram