Download

Adding physics impulses to projectiles

Hello,

I’m trying to find out how I can add impulses to a projectile to alter its trajectory. Specifically what I’m trying to do is make a grenade that a player can throw, and I want the player’s velocity to “add” to the projectile’s velocity (a player moving backwards would result in a weaker throw, while a player jumping or moving forward would result in a stronger throw). I also would like to make the explosions from said grenade have some influence on the trajectory of other grenades nearby.

It seems like the only way to accomplish this is with the ‘Set Velocity in Local Space’ node, but I’m having trouble with the world space to local space conversions. Any help would be appreciated!

Came up with something that seems to work. Posting it here in case this question comes up in any searches.

Out of curiosity, how does Set Velocity compare with Add Force / Add Impulse in this scenario?

I looked at that node and it takes Bone Name as a parameter, so I assumed it only worked with Skeletal Meshes. Set Velocity also lets you completely override the velocity, if you wish.

Cheers! Seems to be optional, but the docs are often less than helpful: