PDA

View Full Version : Rotating the pivot by mxs


JHN
10-19-2007, 03:48 PM
Hi,

I'm trying to rotate a pivot by a vector value, but there seems to be no direct way of doing this, obj.pivot only lets you move it and the pivot methods I found in the manual only take an object argument to align the pivot.

So am I right that I should rotate the object and use objectoffset to "reset" the objectrotation?

-Johan

PiXeL_MoNKeY
10-19-2007, 04:00 PM
*Edit: I didn't fully read your post, or my brain hasn't woke up yet. Yes, you rotate the object and then use the objectOffset to rotate it back, but keep the pivot.

-Eric

JHN
10-19-2007, 04:10 PM
Hahaha, I think you just read the header or something ;)

I read up in the helpfile obviously, and found this function

fn RotatePivotOnly obj rotation =
(
local rotValInv=inverse (rotation as quat)
animate off in coordsys local obj.rotation*=RotValInv
obj.objectoffsetrot*=RotValInv
obj.objectoffsetpos*=RotValInv

)


So my guess indeed was right, no shortcuts on this one :) I'll stick with the function!

Thanx,
-Johan

CGTalk Moderation
10-19-2007, 04:10 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.