WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Collision Exception (https://forum.worldviz.com/showthread.php?t=3070)

jassel41 11-09-2010 10:36 AM

Collision Exception
 
Hi,

I was wondering if there was a way to allow collision with an object while monitoring it for the rest.

For example, in the Getting Your Feet Wet tutorial, the projector light is an object and if collision is on then the view cannot go through the light source. I want to set it up so that the view can travel through only the light but not the other objects.

I tried having a collision event and it checks to see if the collided object is the light source then it turns off collision, any other object collision is turned back on. The problem here is that if the user tried to exit the room next to the light source they would be able to travel through the wall.

Any suggestions?

Thank you in advance,
Jassel41

Jeff 11-09-2010 02:00 PM

You can disable collision detection for individual models:
Code:

import viz
viz.go()

viz.collision(viz.ON)

court = viz.add('court.ive')

box = viz.add('box.wrl',pos = [0,1.5,5])
box.disable(viz.INTERSECTION)


jassel41 11-09-2010 05:08 PM

Oh that is perfect, thank you so much!


All times are GMT -7. The time now is 06:31 PM.

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