![]() |
#1
|
|||
|
|||
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) Harry Anderson |
#2
|
|||
|
|||
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.
|
#3
|
|||
|
|||
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? |
#4
|
|||
|
|||
It needs to be acted on by gravity and not intersect other objects when being grabbed.
|
#5
|
|||
|
|||
The collide mesh will not react to gravity. You could use the vizact.fall command to create a falling animation.
|
#6
|
|||
|
|||
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. |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
.bsp->.obj->.osgt map Collision Problem/Resources for free maps? | plogic | Vizard | 0 | 10-24-2014 07:59 AM |
Physics: Ball Bounces Unexpectly Based Upon Size + Ring Collision Shape | mhead10 | Vizard | 3 | 11-02-2012 01:44 PM |
Collision Exception | jassel41 | Vizard | 2 | 11-09-2010 05:08 PM |
Collision and avatar animation | shahramy | Vizard | 2 | 10-26-2010 11:47 PM |
Collision with child nodes | rubberpimple | Vizard | 4 | 09-17-2008 04:27 PM |