x


Does Rigidbody.freezRotation allow transform.Rotate ?

Hi!

I know mixing forces and transforms on a rigidbody is as bad as crossing the streams, but from what I read on the documentation, RigidBody.freezeRotation "Controls whether physics will change the rotation of the object". Does that mean that if rotation is freezed I can manipulate rotation of my object via transform.Rotate ?

I'm just banging my head trying to align the Y vector of my object to the normal of the face under it via torque. I made it easily through transforms, and I found another question answered here suggesting "physic+transform 'may be not so' bad".

more ▼

asked Jan 11 '12 at 05:38 PM

MrSkiz gravatar image

MrSkiz
18 1 3 4

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

1 answer: sort voted first

Actually yes.

RigidBody.freezeRotation ensure that no force applied to this rigidbody will impact rotation. Nothing less, nothing more.

You can always manipulate rotation (and position too) via transform. And it is a good place to patch an object transform (in your case to keep up-vector aligned with surface normal).

more ▼

answered Jan 11 '12 at 06:19 PM

Kryptos gravatar image

Kryptos
7.2k 5 33

Great, I'll check that then. Thanx a lot !

Jan 12 '12 at 01:53 PM MrSkiz
(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:

x2249
x1948
x1864
x1335
x183

asked: Jan 11 '12 at 05:38 PM

Seen: 740 times

Last Updated: Jan 12 '12 at 04:23 PM