I’m working on a prototype for a turn based RPG and I’m working on projectiles and am trying to make a grenade projectile that can be thrown at a target. I already have the projectile setup so that it will spawn and hit the intended target. (which is simply since both the launch position and target are fixed positions) All I’m looking to do is have it follow the curved arc, but I have been struggling to find a proper tutorial as they all seem to be based around throwing a grenade at a moving target (which I don’t need since the game is turn-based). I’ve been trying to make use of the suggest projectile velocity but my results either have arcing way to high in the air (that it takes several minutes actually to hit the target.) or it travels too fast I can’t even see it.
Does anyone have any suggestions of better methods to accomplish this or potentially what I might be doing wrong with SuggestProjectileVelocity?
This should be doable, if you bring us your SuggestProjectileVelocity code! Also it shouldn’t matter on the “Throwing a grenade at a moving target” thing, a target is a target, you just take out any extra math that predicts the path of a target.
Suggest Projectile velocity is focus on the speed,you can adjust the flying speed,but the arc is hard to control.(faster the speed is,straighter the line is).
if you want more control on the arc,you could use another one,called suggest projectile custom arc,which you can adjust the arc on it.
But the speed is fixed.
And another way is like they said.
Make a timeline animation for it.
That way you can fully control the arc and speed.
for fixed launch and target positions the node you want is Suggest Projectile Velocity with the custom arc option. give it start, end, gravity override and arc param, and it returns a launch velocity that lands on the target along a grenade style curve, no target prediction math needed since nothing moves.
spawn your projectile with that velocity and set its projectile movement gravity scale to match the gravity you solved with, otherwise the flight will not follow the preview. start with arc param around 0.5 and tune from there, higher arcs clear cover but take longer, which matters for turn timing. debug the landing point with a decal before wiring damage so aiming mistakes read as trajectory issues and not collision issues.