Wheel Script

Hello every one
I have simple 3d cube and add it three cylinder (wheels) but I don’t know how can I attach them to cube with script and how to script for moving front and rotate and come back?

create a cylinder,

set cylinder rotation transform properties (in inspector view) to z=90

to make the cylinder move forward, put this script inside cylinder:


function Update () {