- Home /
Help With Charchter Controller or Rigidbody . Please!
How can i make an object always go forward like
rigidbody.velocity = Vector3(0,0,10);
But with charachter controller? I used to do it with the rigidbody but sudenly it shoewd me this error
Actor::updateMassFromShapes: Compute mesh inertia tensor failed for one of the actor's mesh shapes! Please change mesh geometry or supply a tensor manually!
So if you dont know how to help me with the charachter controller can you help me get rid of this error?
Regarding the problem with the inertia tensor, what kind of collider are you using for the character? Is it a convex mesh collider?
Answer by Brian-Kehrer · Dec 19, 2010 at 06:35 PM
You should be calling CharacterController.Move(Vector3 movement), instead of directly applying forces, velocities, etc.
CharacterControllers are not driven by the same physics behavior as rigidbodies, and thus will behave differently.
Answer by FLASHDENMARK · Feb 06, 2011 at 07:48 PM
I think you can do this with a rigidbody:
var moveSpeed = 5.0;
transform.Translate(Vector3.forward * moveSpeed *Time.deltaTime);
Easy and simple this should make the "object" move forward at all times!
Your answer
![](https://koobas.hobune.stream/wayback/20220613091651im_/https://answers.unity.com/themes/thub/images/avi.jpg)