View Single Post
  #1  
Old 12-17-2013, 06:32 AM
performlabrit performlabrit is offline
Member
 
Join Date: Oct 2013
Posts: 77
Rotate object around mainView?

I'm having a bit of trouble here, with what I think is a simple problem.

I have linked the mainView to a vizShape object hmdBox. This box reflects head position returned by a motion capture system. I move around the viewpoint indirectly, by moving around hmdBox. Now, I want to draw another vizShape object that is attached to HMD box, that I can freely rotate around the mainView or HMDbox using .setEuler, preEuler, or a similar function.

The goal is to define position in polar coordinates in a head-based reference frame, so that when the head changes orientation the object stays in a fixed position in the subject's field of view. I imagine the steps are something like this: set the distance of the object from the mainView/hmdBox using preTrans(), and then define an angular offset from the straight ahead vector (preEuler?).

It is important to maintain the parameters of degrees of angular offset and distance.

I should say that the only behavior I'm able to get is this:
The object rotates in its own reference frame (not relative to the parent)
or
the object rotates in another reference frame (i assume it's the world-based reference frame)

Should I not be linking, but be setting position etc rel-parent? Other strategies?

My thanks in advance,
- gD

Last edited by performlabrit; 12-17-2013 at 06:34 AM.
Reply With Quote