WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   selective permeability (https://forum.worldviz.com/showthread.php?t=4985)

kausram 03-14-2014 09:34 AM

selective permeability
 
Hello, I'm a new user and have a question:
I can make all objects in my world permeable with viz.MainView.collision(viz.OFF), but how can I selectively make one object permeable while others remain impermeable?
Thanks in advance!

Frank Verberne 03-14-2014 10:37 AM

With physics activated, all objects have a collision shape, and will collide with the mainview. You can delete the collision shape of an object with the object.collideNone() function.

Jeff 03-16-2014 10:27 PM

You can turn off viewpoint collision for a single object using the .disable command with the viz.INTERSECTION flag:
Code:

import viz
viz.go()

viz.collision(viz.ON)

dojo = viz.add('dojo.osgb')

ball = viz.add('beachball.osgb',pos=[0,1.8,3])
ball.disable(viz.INTERSECTION)



All times are GMT -7. The time now is 04:20 PM.

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