WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-05-2016, 09:46 AM
handerson11 handerson11 is offline
Member
 
Join Date: Nov 2016
Posts: 6
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
Reply With Quote
  #2  
Old 12-05-2016, 01:24 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #3  
Old 12-06-2016, 01:31 AM
handerson11 handerson11 is offline
Member
 
Join Date: Nov 2016
Posts: 6
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?
Reply With Quote
  #4  
Old 12-06-2016, 07:18 AM
handerson11 handerson11 is offline
Member
 
Join Date: Nov 2016
Posts: 6
It needs to be acted on by gravity and not intersect other objects when being grabbed.
Reply With Quote
  #5  
Old 12-06-2016, 10:13 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
The collide mesh will not react to gravity. You could use the vizact.fall command to create a falling animation.
Reply With Quote
  #6  
Old 12-08-2016, 09:06 AM
handerson11 handerson11 is offline
Member
 
Join Date: Nov 2016
Posts: 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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -7. The time now is 08:15 AM.


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