View Single Post
  #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