PDA

View Full Version : "viz.collision(viz.ON)" PROBLEM


Chrissy2009
05-10-2009, 01:10 PM
Hi all,

I want to activate collision detection for the camera and one specific object, so that I'm only able to move the camera inside of a room, and it should not be possible to move it outside.

If I use the command: viz.collision(viz.ON) I've got the problem, that the camera always falls at the bottom of the room. If I want to move it up, it automatically falls down.

I've also tested it at the gallery.py and included some commands to move the camera up and down. But the problem is the same as in my scene.

Therefore I'm looking for a collision detection between to objects. The camera and my room.

Thanks for all your ideas.

Jeff
05-10-2009, 03:13 PM
You can turn off gravity on the viewpoint so that when collision detection is on the viewpoint won't drop back to the eyeheight you're using. Take a look at this page in the docs on viewpoint collision and gravity.

http://www.worldviz.com/vizhelp/Viewpoint_collision_and_gravity.htm

You can also set the eyeheight of the viewpoint using
viz.eyeheight(height)