#1
|
|||
|
|||
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 07:34 AM. |
#2
|
|||
|
|||
TO answer my own question:
The rotation didn't seem to work, so I've achieved my goal by: - Not linking, but creating vizShapes that are children of the hmdBox node (that is linked to the mainview) - doing my own trig to calculate position of the object based on offset angle and distance from the mainview. - Moving the objects with setPosition It's not the first solution one might try, but it works. |
#3
|
|||
|
|||
Have you tried using postEuler to roate the linked child relative to the HMD? preEuler would rotate it relative to the child itself as you reported.
|
#4
|
|||
|
|||
Sure did. It was rotating in an unknown frame of reference - perhaps the world-base frame of ref, but it's unclear.
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mainview can't go back to original point | jacky | Vizard | 1 | 06-04-2013 05:22 AM |
How to link the Mainview to a child object | jacky | Vizard | 1 | 05-02-2013 10:51 AM |
rotate camera about an object | dwaik | Vizard | 2 | 02-09-2010 02:06 AM |
rotate object in relation of sth. else | Penguin | Vizard | 6 | 05-11-2009 09:54 AM |
rotate to object | jargon | Vizard | 1 | 08-08-2005 01:20 PM |