Interpolated Projectiles Cause Wrong Rotation After Reflecting

airoll

Member
In my game, projectiles can reflect off of character's shields. Normally, the projectile, when reflected, should face the direction that is moving, such as the image below.

1687932360861.png

However, when interpolate is turned on (in ProjectileBase.cs), sometimes the projectile rotation can become momentarily messed up. I confirmed that this issue is fixed if I set Interpolate to false in ProjectileBase.cs. My guess is that what is happening is that the reflect is causing an instantaneous change in rotation and the interpolation is trying to interpolate between the previous velocity direction and the reflected velocity direction.

1687932296778.png

Is there any suggested fix for this issue aside from turning off interpolation?
 
I will look into this and have a proper fix for the next update. You are correct in the understanding for why this is happening.
 
Top