View Full Version : Collision complex shapes

12-05-2016, 09:46 AM

I am making a realistic assembly process with complex objects and realistic physics. I am currently populating the objects with spheres for collision but it is proving problematic and very time consuming.

Is there a simpler way to detect collision whilst having realistic physics being applied and allowing for grabber tool interaction?

Here is an example of a simple disc:

Disc1=viz.addChild('Disc VR Models\Bottom Disc.wrl', euler=(0,90,0), color=viz.GREEN, alpha=1)
RADIUS = 0.075
for deg in range(0,360,10):
x = math.sin(viz.radians(deg)) * RADIUS
z = math.cos(viz.radians(deg)) * RADIUS
Disc1.collideSphere(radius=TUBE_RADIUS,pos=(x,z,0) )
Disc1.crashSound = viz.add('sounds/crashQuiet.wav')

Harry Anderson

12-05-2016, 01:24 PM
If you don't need the complex model to be affected by forces then you could use a collide mesh to detect when other objects collide with it.

12-06-2016, 01:31 AM
I need it to be acted on by gravity.
Is there any way to program the mesh to be acted on by gravity?
Or is there another way to make the parts seem like gravity is acting on them?

12-06-2016, 07:18 AM
It needs to be acted on by gravity and not intersect other objects when being grabbed.

12-06-2016, 10:13 AM
The collide mesh will not react to gravity. You could use the vizact.fall (http://docs.worldviz.com/vizard/#commands/vizact/fall.htm) command to create a falling animation.

12-08-2016, 09:06 AM
Hi Jeff thanks again,
I was trying to get the objects to fall realistically which is something that is key in my program, also I need objects to fall on top of each other as they would in real life.