Hi, In my project I would like reuse some rigid body, so stop them, move and sleep, I tried with:
reset(world :World) {
let collider = world.getCollider(this.colliderId);
let rigidBody = collider.parent()!;
rigidBody.setTranslation(new Vector2(0,settings.ballHeight), false);
rigidBody.setNextKinematicTranslation(new Vector2(0,settings.ballHeight));
rigidBody.setRotation(0, false);
rigidBody.setNextKinematicRotation(0);
rigidBody.resetForces(false);
rigidBody.resetTorques(false);
rigidBody.sleep();
}
But it is still awake.
It is TypeScript but I think the same issue is present with javascript and rust.
I am using the 0.11.1
Hi, In my project I would like reuse some rigid body, so stop them, move and sleep, I tried with:
But it is still awake.
It is TypeScript but I think the same issue is present with javascript and rust.
I am using the 0.11.1