Workshop.codes
Login
Create
BellaLabs

Demo: Projectile Aimbot for Target with Velocity

This code is over 6 months old. The code may have expired and might no longer function.

1 Comments

Log in or Sign up to leave a comment.
ArcanaXXI#2297 over 2 years ago *

Hello ArcanaXXI from the Overwatch forums, i want to provide a conversation method that can turn a projectile's speed to it's velocity vector if you want to try a component or element-wise method for your prediction solver.

In pseudo code it will look like this:

SpeedToVelocity(Speed, Direction)
{
return (Speed / MagnitudeOf(Direction)) * Direction;
}

Where speed is the projectiles speed value and direction can be any vector, unit-length etc. And returns a vector whose magnitude is equal to the speed of a projectile.
Hope it helps.
Best regards
ArcanaXXI

Workshop.codes