Andrey Zimin Posted February 16, 2018 Share Posted February 16, 2018 Hi friends! There is a method setLinearVelocity() it sets the linear velocity vector. How to make the speed zero? Vector BABYLON.Vector3.Zero() in my opinion there not fit! And also about setAngularVelocity()! How does the rotation speed make zero? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted February 16, 2018 Share Posted February 16, 2018 Both methods take the same parameters. You can always verify by looking at the class documentation: https://doc.babylonjs.com/classes/3.1/physicsimpostor#setangularvelocity-velocity-rarr-void mesh.physicsImpostor.setLinearVelocity(BABYLON.Vector3.Zero()); mesh.physicsImpostor.setAngularVelocity(BABYLON.Vector3.Zero()); That should remove linear and rotational movement. If you don't have any joints you could try a forceUpdate(), but I have not found that necessary myself. Otherwise you can sleep() and wakeUp() the physics impostor, but then it loses physics properties. If that code doesn't work then can you reproduce in a PG? Andrey Zimin 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.