Hi guys!
So my dear friends. I have a problem. I just try to drive a motorcycle but he makes wheelys and he jump. It’s difficult to explain, but I can’t drive with this vehicle!
http://eruheran.co.de/motorcycletest.html
Here my Script to drive:
var frontWheel : WheelCollider;
var backWheel : WheelCollider;
var maxTorque= 260.0;
function Start () {
rigidbody.centerOfMass.y = 0;
}
function FixedUpdate () {
frontWheel.steerAngle = 10 * Input.GetAxis("Horizontal");
frontWheel.motorTorque = maxTorque * Input.GetAxis("Vertical");
backWheel.motorTorque = maxTorque * Input.GetAxis("Vertical");
}
PS: I’m new in Unity3D.
the gravity seems to be too low,like a bike in space… also the bike needs to be more heavy, this way the torque is just way too much for the pressure gravity its making against the bike, and making it jump because of the extreme force/gravity ratio its currently having
increase the forces to make the bike stick to the ground , increasing the gravity, and the bikes mass, and in some situations directly applying physical forces to the bike towards the ground
ps. that bike model also has reversed normals 
Okey. I try to give him gravity with the rigidbody-component-setting “Angular Drag”, but he’s jumping too then.
Is there a code that I can write in my Drive-Script?
I addes
var maxTorque = 5;
var gravity = 2;
But I don’t know, he’s not stable. Is there not a Script vor a bike on 2 Wheels?
An easy way to fix this is to set the rigidbody’s centre of mass lower:-
rigidbody.centerOfMass = new Vector3(0, -0.5, 0);
It is actually possible to set the centre of mass below the ground so that the bike tends to bob upright. However, this may not be a suitable effect, depending on how realistic you need the physics to be.
If I add to gravity 1900, then is my vehicle 1900kg heavy? Or what for a value have gravity = 1?
And what I need to do, that I can control my bike to drive left right? the Stabilisation is good, but he don’t have the permission to fall. He needs to be on the ground vor ever.
There is a code, but i do not remember.
Edit: subdomain.com - Subdomain.com