PDA

View Full Version : objects in a scene..how to do this


Canucks
01-26-2017, 03:17 PM
im using the lab.osgb as my main scene. I put obstacle such as crate.osgb. When participant using marker try to walk he pass through the object. How can I make it that if the participant doesn't lift his leg high enough it get stuck behind the object?

Canucks
01-27-2017, 09:35 AM
I used collide plane but still does it

Jeff
02-01-2017, 02:27 PM
There's not a built-in function to do this. You could try using a proximity sensor to detect when the user is near the crate. Then get the position of the foot tracker and check to see if it's above the height of the crate. If not, prevent further updates to the viewpoint position.

Canucks
02-14-2017, 11:47 AM
Hi Jeff,
How do you compare just Y values?
Let's say getPosition () returned (1,1,2) and box's dimension is ( 2,2,2) so Y value is smaller..how do you compare just y values?

Jeff
02-15-2017, 05:25 PM
The getPosition() command returns an [x,y,z] list that you access like other Python lists:

pos = tracker.getPosition()
x = pos[0]
y = pos[1]
z = pos[2]