Ive just started using unity and have been trying to make a 2.5d sidescroller,i need help to make a platform rotate 90 degrees verticaly and then back....i would realy like to know how to do this...please help :)
Transform.Rotate() will rotate the platform around its midpoint. If you want to rotate around another point such as the edge, you'll need Transform.RotateAround() instead. With a little fiddling you should be able to figure out the vectors that work best for you, eg Vector3.forward or Vector3.left.
var right = true;
function Update () {
if (right) { rotation = 100.0; transform.Rotate (0,0,rotation * Time.deltaTime); }
}
Thanx ive been trying it .... how would you write up a script for the platform... i think im doing somthing wrong