hello
after importing a 3d model in Unity 3.6, is it possible to change the center fo mass ?
hello
after importing a 3d model in Unity 3.6, is it possible to change the center fo mass ?
You can use this method:
var centalMassY : float = -0.01;
function Start ()
{
this.rigidbody.centerOfMass = Vector3(0, centalMassY, 0);
activeWayPoint = WayPoint.start;
}
thanks for your reply
Sorry I asked a wrong question, I meant :
My Leopard tank model is made of 3 groups : body - turret - barrel
The center of rotation of the gameObject “Leopard” is outside the model itself
if I attach a script to the gameObject with the function : transform.Rotate(…);
My tank does not rotate about its center of mass
If I attach the script to the “body” group, whose center of rotation matches the center of mass , my tank does not rotate
I would prefer not to use the rigidbody , AddTorque() function
Is it possible to move the center of rotation of a GameObject Leopard ?
I would use for the centerOfMass an separate empty gameobject that is living directly under the root tank object(its more flexible). You should also make sure that your mesh objects are having correctly centered pivot points. There are also two tank examples inside the asset store for a reasonable price (± $15,00). Basically I recommend you to read as match code as you can handle like Edy’s Vehicle Physics, Unity Car and the free Car tutorial.
Peter.
If you use cinema 4d, there is an option to set coordinate system to center of the object.
In cinema 4d → Mesh → Axis Center → Axis Center Press button “Execute”
the axis aling to the center of the object.
I use it many times before export.
Hit and tip: make sure you put your object coordinates Freeze Transformation 0,0,0.
Thanks again
I follow the empty object suggestion, it works
I dont use Cinema 4D
Does anybody know whether Blender supplies the same feature ?