- Home /
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? thanks
Answer by black pigeon · Mar 06, 2013 at 07:12 AM
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 () {
transform.Rotate(0,-1,0);
transform.Translate(0.1,0,0);
}
Your answer
Follow this Question
Related Questions
[NEWBIE]How to destroy a WheelCollider ? (with a script) 1 Answer
Ball Character controlled by a single Joystick? 0 Answers
Controlling script 0 Answers
How to steer vehicle with mortorTorque or different wheel speed in each wheel (for Tanks movement) 0 Answers
Very Simple Left and Right Movement Script [OR] disable dravity on CharacterController? 2 Answers