# Changing\Switching Physics Controls

Hello,
Is it common practice to change physics controls for my character?
For example: When it falls from the sky to the ground I want it to bound to RigidBodyControl but when it touches the ground I want to have all the abilities (walk, jump etc) of BetterCharacterControl. So is it OK to switch between controls?

Iâ€™m not sure if youâ€™re asking the right questionâ€¦ Yes itâ€™s fine to do this.

Usually the easiest way to get the answer youâ€™re looking for is to describe what youâ€™re trying to achieve, what you have done to simulate that action, and why it doesnâ€™t do what you want.

If your way works - then its fine. Thereâ€™s no reason why you canâ€™t remove a physics control and/or add another.

Sure, thanks.
See this clip for reference
I like the behavior and performance of RigidBodyControl with the Sinbad character
but when it falls from the sky and touches the ground I need some way to get it back on his feet so I thought that maybe detaching the RigidBodyControl and replacing it with BetterCharacterControl will do the trick even though I prefer to continue using the RigidBodyControl

Actually I found a way to make Sinbadâ€™s RigidBodyControl raise â€śback on his feetâ€ť but I have no idea why it works so I cannot rely on it.
Here is the code that does the trick:

``````ctl.applyTorque(new Vector3f(0, 0, 0));
Quaternion rot = ctl.getPhysicsRotation().fromAngles(x, y, z);

I think â€śwhy it worksâ€ť would depend entirely on what x, y, and z are and how you found them.

No matter what values Iâ€™ll put in x,y or z (Usually Iâ€™m using just one of them and the others are zero), It will always put the character in the right position - â€śstandingâ€ť up on the ground but I have to do both applyTorque and setPhysicalRotation to make it happen. If I just rotate it will not â€śstandâ€ť above the ground, Half of its body might be below the ground. I can post a clip to demonstrate it.

You probably just need to reset the rotation to zero (just give it a new quaternion) and set the linear velocity to zero so it stops continuing to move in whatever direction it was.

1 Like

Yeahâ€¦ Iâ€™m going to have to say that I donâ€™t believe you. For example, putting all 0, 0, 0 will effectively be a no-op.

What does this mean? What do you mean by â€śjust rotate itâ€ť?

The reason I ask is because you are doing two things. 1) applying 0 torque, 2) rotating. (1) is not in questionâ€¦ you of course will have to do that. (2) is what weâ€™re discussing and how the values of x,y,z should affect how/why it works.

Else youâ€™ve left out another piece of the puzzle.

My point is that any value I tried with the setPhysicsRotation resulted in same way - putting the model on the ground. I didnâ€™t try 0,0,0.

Anyway I liked the performance and behavior of the RigidBodyControl while falling from the sky to the ground but when being static in the ground I prefer to switch to CharacterControl and it works as expected (see clip below).
Switching from RigidBodyControl to CharacterControl

Thank you guys for the assistance. I just started using dynamic physics (non kinematic) and it introduces quite a few challengesâ€¦