WorldViz User Forum

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

handerson11 12-05-2016 09:46 AM

Collision complex shapes
 
Hi,

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:

Code:

#Discs
#Disc1
Disc1=viz.addChild('Disc VR Models\Bottom Disc.wrl', euler=(0,90,0), color=viz.GREEN, alpha=1)
#Disc1.collideBox(friction=.001)
RADIUS = 0.075
TUBE_RADIUS = 0.02
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.enable(viz.COLLIDE_NOTIFY)
Disc1.crashSound = viz.add('sounds/crashQuiet.wav')
Disc1.setPosition(0,1,1)

Thanks,
Harry Anderson

Jeff 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.

handerson11 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?

handerson11 12-06-2016 07:18 AM

It needs to be acted on by gravity and not intersect other objects when being grabbed.

Jeff 12-06-2016 10:13 AM

The collide mesh will not react to gravity. You could use the vizact.fall command to create a falling animation.

handerson11 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.


All times are GMT -7. The time now is 06:10 AM.

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