x


Stop a rotating plane using external force

I have a plane which rotates using rigidbody.MoveRotation(). I want the rotation to slow down and ultimately stop after a certain time.

On the screen I want to show that the Plane stopped rotating because it kept hitting another object.

How can I do this? Please help.

more ▼

asked Jun 28 '10 at 09:25 AM

Pria gravatar image

Pria
13 3 3 7

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

1 answer: sort voted first

You can adjust the rigidbody's angular drag. This will slow down and ultimately stop the rotation of your object. I don't know what you mean with your second question. How to print something to the screen?

more ▼

answered Jun 28 '10 at 09:29 AM

StephanK gravatar image

StephanK
6k 39 53 93

I dont want to print anything on the screen. I meant that on screen it should look like the plane stopped moving because of the other object.

I should adjust the angular drag in script?

Jun 28 '10 at 09:33 AM Pria

My object is kinematic...the angular drag is not working :(

Jun 28 '10 at 10:02 AM Pria

If you are using the example code for MoveRotation() just decrease eulerAngleVelocity. You can use a Coroutine and Vector3.Lerp for that.

Jun 28 '10 at 10:40 AM StephanK
(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:

x3735
x2163
x1788
x292

asked: Jun 28 '10 at 09:25 AM

Seen: 1445 times

Last Updated: Jun 28 '10 at 09:25 AM