How to get power of collision?

Get help using Construct 2

Post » Sun Feb 14, 2016 1:43 am

Example what i want:
sqrdestructPower = 5;
if(collisionAnotherObject && sqrdestructPower > relativevelocity.sqrmagnitude )
destroy object.
B
14
S
2
Posts: 66
Reputation: 776

Post » Sun Feb 14, 2016 6:05 am

The closest thing I can think of that matches that is kinetic energy (KE), which can be calculated with:
KE = 0.5*mass*velocty^2

But why not just do it just like that example? The power is just a variable with a value of 5, which you then compare with the velocity^2, or just like your other topic.

The only new thing would be the relative velocity I guess, but that's just a simple vector subtraction of one velocity from another.
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959


Return to How do I....?

Who is online

Users browsing this forum: David181, OBLIVION and 58 guests