![]() |
#1
|
|||
|
|||
translating viewpoint along body orientation
Peeps-
Is there a way in 2.53 to translate the viewpoint in absolute coordinates of the BODY_ORI reference frame (I believe you can do this with setPosition in R3)? "Move" allows you to set BODY_ORI as the mask, but I want to translate the viewpoint absolutely, not relatively to my current position. Thanks. |
#2
|
|||
|
|||
I don't understand exactly what you mean by absolutely in the BODY_ORI reference frame. Translating a view absolutely is always in the world reference frame. Can you explain exactly what you are trying to accomplish?
|
#3
|
|||
|
|||
I'm using ppt data to translate the viewpoint but I'm changing the orientation of the body of the viewpoint. I'd like to translate the viewpoint according to the new orientation of the body, not according to the world axes. So, if I rotate the body 90 degrees I still want movement along the z axis of the room to result in forward movement. That only works if I use movement along the body's axes-- if I use world axes then moving forward in the room will move me sideways in the world since my body is now facing to the right. Right now I'm using the "move" function because it allows for a BODY ORI mask although then I have to calculate the relative changes in the ppt data instead of using the raw data since "move" translates relative to the current position. This works but I was wondering if I could skip the step of calculating relative changes by using something that just translates the viewpoint to absolute points within a rotated reference frame.
|
#4
|
|||
|
|||
Ok, I see. Then simply translate the viewpoint absolutely to (0,0,0) then apply the ppt position relatively to the BODY_ORI:
Code:
view.translate(0,0,0) view.move(ppt[0],ppt[1],ppt[2],viz.BODY_ORI) |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|