WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-17-2013, 07: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 07:34 AM.
Reply With Quote
  #2  
Old 12-17-2013, 09:22 AM
performlabrit performlabrit is offline
Member
 
Join Date: Oct 2013
Posts: 77
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.
Reply With Quote
  #3  
Old 12-18-2013, 02:30 PM
masaki masaki is offline
Member
 
Join Date: Jan 2008
Posts: 63
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.
Reply With Quote
  #4  
Old 12-19-2013, 07:31 AM
performlabrit performlabrit is offline
Member
 
Join Date: Oct 2013
Posts: 77
Sure did. It was rotating in an unknown frame of reference - perhaps the world-base frame of ref, but it's unclear.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 09:46 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC