Skip to content

Best practice for a sliding door as Kinematic body ? #1302

Answered by jrouwe
Froyok asked this question in Q&A
Discussion options

You must be logged in to vote

MoveKinematic will calculate the velocity needed to go from where you are to the desired position in the desired delta time (= usually a single physics update). The physics engine will never change the velocity of a kinematic body, you need to do this yourself. If you stop calling MoveKinematic the body will continue moving at the same speed forever. If you want the body to stop after arriving then call BodyInterface::SetLinearAndAngularVelocity(body_id, Vec3::sZero(), Vec3::sZero()).

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Froyok
Comment options

Answer selected by Froyok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants