single axis Projectile Acceleration
-
While we currently have proj:SetAcceleration(accel), can this be abused to change the acceleration of just a single axis after its already in flight? The Wiki doesn't appear to show anything one way or the other.
Quick example:
local x = 0 local y = -1 local z = 0 proj:SetAcceleration(x,y,z) -
That would probably be https://github.com/FAForever/fa/blob/develop/engine/Sim/Projectile.lua#L174 Get/SetVelocity.
Acceleration is used for the projectile to reach it's max speed -
You can adjust this with
Projectile:SetBallisticAcceleration(y). Gravity is -4.9 by default.
The documentation is a bit outdated, but you can also doSetBallisticAcceleration(x, y, z)for acceleration in any direction; I just tested it. Make sure your projectile's MaxSpeed is high enough for it to accelerate how you want it to.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login