A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by jargo » Thu Nov 13, 2008 4:22 pm
I am making a game where damage done by a projectile is determined by the kinetic energy of the projectile. What would be easiest way to calculate this ? I can't simply use the equation e=1/2m*v^2 because I also need to take account the speed that the target is moving. For example if the target is moving 300 m/s to y+ direction and the projectile is moving 1000 m/s to the y+ direction it should do less damage than if the target would be stationary. I have all ready defined my own contactCallback that gets called when a projectile collides with an object.
-
jargo
-
- Posts: 3
- Joined: Thu Nov 13, 2008 4:20 pm
by martinsm » Thu Nov 13, 2008 7:06 pm
In calculations use relative speed of projectile (relative to surface of impact): V_relative = V_projectile - V_surface
-
martinsm
-
- Posts: 86
- Joined: Mon Dec 19, 2005 3:15 pm
- Location: Latvia
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 20 guests