- Home /
Physics and gravity of my 3D model
Hello, im new to Unity3D and I have 4 big problems :) watch the video with my problem
video: http://www.youtube.com/watch?v=OaS3F0KiYSM
1 As you can see, gravity doesnt work at my tank, my tank is light as a feather and more times takes off from the ground, not to mention that the tank should not climb the hill
2 I dint know why, but when i start "flying" with my tank my turret becomes unattached as you can see
3 How can I add some physics tank, for example, when I go to the hill so the tank appropriately tilted backwards ... or tank leans after passing a small hill
4 Question i think its last for today :) is somewhere some nice intro Unity3D that is displayed at the beginning of the launch such as http://www.youtube.com/watch?v=a5yQkHCfMEs CryEngine or Unreal Engine 4 http://www.youtube.com/watch?v=dLNTXEz0WYM ... CE3 and UE4 have a very nice intro :)
There is my script for controling tank:
function Update() {
var steer=Input.GetAxis("Horizontal");
var gas=Input.GetAxis("Vertical");
var turnSpeed:float = 50;
var turnAngle:float;
var moveDist:float;
if ((gas!=0) && (prvy == 1))
{
moveDist=gas*speed*Time.deltaTime;
transform.Translate(Vector3.forward*moveDist);
}
if ((steer!=0)
{
turnAngle=steer * turnSpeed * Time.deltaTime * gas;
transform.rotation.eulerAngles.y+=turnAngle;
}
}
And here is my hierarchy of my tank:
Thanks for your help
Research Character controllers and rigdbodies, and do a Google search for them.
i think I have a good character contollers, Can you please provide more information?
Please first do as advised an google. Ecspecially rigidbody. If you tank does not behave like you want it then you configured something wrong (not enough mass for example). Also vehicle physics have to be programmed, and for a more realistic behavior you need to adjust the character controller.