XaiJu
Megan Fox
Megan Fox

patreon


How that SuggestProjectileVelocityFromPeakHeight works

You might have seen that node and gone "huh", and yeah! It's something I adapted from a friend's math library. I don't claim credit for the logic at the core here, most of what I did is move stuff around to make it work as a clean BP node.

The gist is that this calculates a lofting velocity based on a start point, an end point, and the desired maximum height you'll reach along the arc. Most other projectile velocity calculators require you to know the initial speed ahead of time, or produce an arbitrary arc height, but those really aren't what a video game tends to need. This is!

Anyhoo, code's here: https://pastebin.com/MjZHbhJx 


More Creators