How make front wheel bike turn left or right?


I have looked everywhere, also tried modifying car tutorials to try get a 2 wheel bike setup, I have a bike setup using gameobjects, wheel colliders, hinges…sort of all hangs together ok…but I cannot get the front wheel to turn on the Y axis say if I press A or D keys… no matter what scripting I try…

Has anyone got some pointers for me?


I think I have it working now… I was rotating the wheel too much…

Code attached to front wheel now looks like:

if (isddown==1){transform.Rotate(0,20,0);return;}
if (isadown==1){transform.Rotate(0,-20,0);return;}

and this works much better :slight_smile:

Initially I had:
if (isddown==1){transform.Rotate(0,270,0);return;}
if (isadown==1){transform.Rotate(0,-270,0);return;}

So that is rotating it way too much.
Not sure why I did that!

It is not a very smooth rotation either :frowning: