Hi I am trying to create a create a projectile system. It includes the projectile going in a Sinwave.
The problem is it includes adding 2 rotators. When the projectile is shot towards the sky or towards the ground, according to my guess, it gets gimble locked and patterns gets closer.
Is there any way to avoid it?
In udk there was a function RTransform() to get around it.
I am using something like this
if (directionturn == 1)
{
Rotation+= FRotator(45, 0, 0);
}
InitialVelocity = ProjectileMovement->Velocity;
ChangeVelocity = Rotation.Vector();
Then in a tick function do this
ProjectileMovement->Velocity = InitialVelocity + ((SinVelocityMultiplier * ProjectileSpread) * ChangeVelocity);
The function is more complicated then this. I have written it in simpler way