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.
 
I just checked and it does actually look like the fix was added in November of last year. Are you still seeing the issue in the latest version?
 
Actually it turns out since I had modified the TrajectoryObject code, I did not update my custom code with the new code that fixes this. I just confirmed it's working now, thanks!
 
Back
Top