A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by Carli » Sun Feb 07, 2010 1:52 pm
Hi,
i want to implement an explosion into my game and i wonder how to realize an airwave.
- what is the optimal way to implement an object finder without scanning the whole map
- how can I check if an object is hidden by another one
-
Carli
-
- Posts: 245
- Joined: Fri Oct 02, 2009 5:28 am
by JernejL » Sun Feb 07, 2010 3:51 pm
Carli wrote:Hi,
i want to implement an explosion into my game and i wonder how to realize an airwave.
- what is the optimal way to implement an object finder without scanning the whole map
- how can I check if an object is hidden by another one
NewtonWorldForEachBodyInAABBDo is very efficient spatial body search for events like explosions that you desire to simulate.
-

JernejL
-
- Posts: 1587
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by PJani » Mon Feb 08, 2010 6:39 pm
quick question, its in my ToDo list.
how can i calculate a approximated box(which approximate collision of some body) surface which will be hit by an explosion air wave. The pressure explosion unleashes is in N/m^2 that why i want to get approximated surface of body?
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
-

PJani
-
- Posts: 448
- Joined: Mon Feb 02, 2009 7:18 pm
- Location: Slovenia
by JernejL » Mon Feb 08, 2010 7:37 pm
PJani wrote:quick question, its in my ToDo list.
how can i calculate a approximated box(which approximate collision of some body) surface which will be hit by an explosion air wave. The pressure explosion unleashes is in N/m^2 that why i want to get approximated surface of body?
You could use the support vertex functionality to get a approximate silhuette surface size from a particular angle, but that would not properly take into account if a object is hidden behind another object, etc..
-

JernejL
-
- Posts: 1587
- Joined: Mon Dec 06, 2004 2:00 pm
- Location: Slovenia
-
by Julio Jerez » Mon Feb 08, 2010 11:51 pm
LIke delfi say, you can use the support vert function, check the ogrenet wraper.
but even faster that tha will be get AABB, since the AABB do not have to be exact.
the good thing about using the suppport vertex is the you do not need to use a AABB you can use the cross setion of the face facing the shock wave of the explosion.
bacially you can get a quad of a triangle perpendicular to the direction of travel of the explosion and use the area ad a mesure of the impact force..
that way big objects will get more of the shock wave than small objects .
-
Julio Jerez
- Moderator

-
- Posts: 12452
- 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 1 guest