- Home /
ConstantForce not producing movement
i added constant force to my player (a sphere) but when i edit the force values it has n effect on the player, i also tried adding values in the script, no luck. please help.
Answer by Recluse · Jun 18, 2011 at 10:20 AM
Try turning Is Kinematic off in the inspector - it means your Rigidbody won't be affected by physics if set to on, which is what you have in the screen capture.
Answer by ant123 · Jun 18, 2011 at 11:00 AM
Thanks, that's very helpful, at least i have some kind of result now! the player who has constant force is still static but now the bullets firing at him are going up in the air! i will try to understand.
Ok it turns out the character controller physics overrides the other physics, so you have to code something from scrath or make 2 modes, one which turns off the caracter controller whenyour doody starts to fly.
Answer by ant123 · Jun 18, 2011 at 12:09 PM
Now the "Character_Controller" is preventing the constant force from working, it only moves when i delete the character controller. will have to reasearch what is up... brb
Answer by Recluse · Jun 20, 2011 at 08:41 AM
The character controller script that comes with Unity is more suited for Doom-style movement or FPS shooter games. It is not set up for realistic physical behavior.
You need to decide what will control your character - physical forces, in which case you turn off isKinematic and apply forces to the rigidbody, or if you control the character through altering its Transform in script, in which case you set isKinematic to true.
You can mix the two systems, but it will require a good knowledge of scripting and of the differences between them to make it work.