PDA

View Full Version : selective permeability


kausram
03-14-2014, 09:34 AM
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 <node3d>.disable command with the viz.INTERSECTION flag:
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)