A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by amalahama » Thu Apr 15, 2010 12:55 pm
Hello everyone!! I'm trying to use Newton to manage the physic of a Flight simulator. As the terrain is huge, and I only need a small terrain collision mesh below the aircraft, my idea is create a collision tree mesh which move with the aircraft, reading height data from my terrain cache.
I could destroy the collision tree and create a new one in each iteration, but it doesn't seem very efficient. My idea is to modify the existing mesh adding more faces and deleting others that thet aren't going to be used any more.
So...
*Is it possible to call to NewtonTreeCollisionBeginBuild in each newton update? Or can only it be used once for each tree collision object?
*How can I delete faces of the mesh? Newton doesn't have a method similar to "NewtonTreeCollisionAddFace" to delete faces.
Regards and many thanks!!
-
amalahama
-
by Julio Jerez » Thu Apr 15, 2010 1:17 pm
Build Collision tree on teh flight does not sound like a good idea.
there are more effiecient solutions than modifiing a collision tree on the flight that you can use.
tell me first, are the faces you are adding irregular triangles or can you use a Highfield?
I sound to me that a used mesh can solve you problem very nicelly,
basically a user mesh is a collision tree without faces, and you fill the faces in the collision callback base of a AABB size.
The callback is a direct call, so for case like yours where you know where the faces in the data base are it can be even much faster that a collition tree.
How does that sound to you?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 2 guests