Jump to content

Speed zero


Andrey Zimin
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...