x


Constant Rotation to an Object

How would I make an object constantly rotate in a single direction? This particular time being in the Z axis? For all eternity? Undisturbed forever?

more ▼

asked Mar 17 '11 at 08:34 AM

PlatinumSkink gravatar image

PlatinumSkink
45 14 15 20

(comments are locked)
10|3000 characters needed characters left

3 answers: sort newest
void Update ()
{
    transform.Rotate (0,0,50*Time.deltaTime); //rotates 50 degrees per second around z axis
}

take a look at link texttransform class and it's methods

more ▼

answered Mar 17 '11 at 08:39 AM

Ashkan_gc gravatar image

Ashkan_gc
9k 33 56 117

(comments are locked)
10|3000 characters needed characters left

There is a script ready in case of Lerpz which can be downloaded directly from the official site. Is the tutorial 3dplatform

more ▼

answered Mar 17 '11 at 10:59 AM

Unamine gravatar image

Unamine
362 14 17 27

(comments are locked)
10|3000 characters needed characters left

var degreesPerSecond : float = 50.0;

function Update() { transform.Rotate(Vector3.up * degreesPerSecond * Time.deltaTime, Space.Self); transform.Rotate(Vector3.left* degreesPerSecond * Time.deltaTime,Space.Self);

rigidbody.isKinematic = true;

}

you can use this one also to rotate constant speed as u want.

more ▼

answered Mar 17 '11 at 09:53 AM

pravin gate gravatar image

pravin gate
27 18 18 25

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x720
x285
x32
x17

asked: Mar 17 '11 at 08:34 AM

Seen: 2227 times

Last Updated: Mar 17 '11 at 08:34 AM