WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-06-2010, 04:19 PM
Dave Dave is offline
Member
 
Join Date: Jun 2007
Posts: 26
Collision problem

Hi - I am having trouble with viewpoint collision. I have a very large mesh that is a landscape and in a few places I have smaller separate models overlying the mesh that are more detailed areas.

The viewpoint flies over the landscape and is prevented from descending below a fixed level except when it is above the more detailed models where I would like it to go lower but collide with the ground and not go through it.

<viewpoint>.collision( viz.ON ) does actually work but the problem is that the 'flythrough' judders to a crawl - presumably because the viewpoint needs to check whether it is going to collide with every node in the large landscape.

I had hoped that collideMesh applied to the smaller models would cause the viewpoint to collide just with those models but try as I might I cannot get the viewpoint to collide with anything in this way.

I presume that collideMesh, collideBox etc only operate between objects and not a viewpoint and an object. Is there any way to make the viewpoint collide with the surface of a single object within a scene?

Any ideas will be very much appreciated.

Thanks

Dave
Reply With Quote
  #2  
Old 09-07-2010, 02:49 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
As you guessed, collision shapes work between objects and not the viewpoint. You can turn on viewpoint collision and disable it for certain models. The following example disables viewpoint collision with the court but not the box:
Code:
import viz
viz.go()

viz.collision(viz.ON)

court = viz.add('court.ive')
court.disable(viz.INTERSECTION)

box = viz.add('box.wrl',pos = [0,1.5,5])
Reply With Quote
  #3  
Old 09-16-2010, 04:25 AM
Dave Dave is offline
Member
 
Join Date: Jun 2007
Posts: 26
Thanks Jeff - that works fine. I did have a problem in that due to the scaling that I had used the viewpoint did not seem to be able to get close enough to the ground (I guess there is a lower limit for the buffer size) but this was ok when I scaled everything up by a factor of 20. Thanks again.
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
problem with collision? shahramy Vizard 1 06-01-2010 01:17 PM
problem with collision ruby21 Vizard 3 05-19-2010 05:32 PM
Collision problem: Balls fly through the wall Chrissy2009 Vizard 11 05-19-2009 04:38 AM
Collision with child nodes rubberpimple Vizard 4 09-17-2008 04:27 PM
problem with collision detection paulpars Vizard 6 06-09-2006 06:03 PM


All times are GMT -7. The time now is 01:26 PM.


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