NextGen Needs Math Help - How hard an actor collides with another?
Hey Guys,
I'm in need of some math help please. I'm trying to figure out the force in which one object strikes another. I've tried out some equations involving linear velocity; but nothing has worked. Any help is appreciated.
Thanks,
Matt
I'm in need of some math help please. I'm trying to figure out the force in which one object strikes another. I've tried out some equations involving linear velocity; but nothing has worked. Any help is appreciated.
Thanks,
Matt
![:D :D](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/grin.png)
Comments
Thanks
wait its what i described before lol - no need to x-1! squaring will cover you
P = MV
Momentum = mass X velocity
And we are looking for its momentum in both the x and the y.
I believe its usually calculated separately (P(x) and P(y)), but ehh.
So we can do:
mass (self attribute) X magnitude(velocity.x, velocity.y)
Maybe?
edit: outasite sounds legit
That it pythagoreans. Use vectors...
A^2 + B^2 = C^2 C is what U want.
C = [(velocity.x)^2 + (velocity.y)^2]^.5
square root((linearX * linearX)+(linearY * linearY))
C = [(velocity.x)^2 + (velocity.y)^2]^.5
...i think? to the power of 0.5 is same as square root is my feeling, i think nextgen you think he means multiply by 0.5?
^ = to the power
I am constraining self.Power Of Strike to [ self.Motion.Linear Velocity.X pow(2)+ self.Motion.Linear Velocity.Y pow(2]pow(.5)
Is this correct?
Thanks Again,
Matt
Matt
I just tried both ways & did a debug by having the actor display self.Power Of Strike & both times it constantly stayed at 0 while I was moving the actor all around with the arrow keys?
If you are not getting a value from this then you simply are not doing it correctly. The only thing I would do differently is Magnitude(LinearVelocity.X,LinearVelocity.Y) But that just cause im anal about some things. either should work.:)