Hello
I have a character that fires projectiles with the ability to lean through the quaternion lerp function. When I fire the projectile, it uses the transform forward of the projectile transform position as the origin of which to fire the projectile from.
This works fine until I lean, when I lean, notably when I aim upwards (along y axis Im guessing), the projectiles fired are not in line with where it should be going (projectiles land well below the transform forward of the position).
To make matters worst, when firing the projectiles in rapid succession, a projectile would occasionally land at the respective position its supposed to go.
What can possibly be wrong with my script? The projectile position is a child of the rotation of the character that drives the lean mechanic. I’ve tried all sorts of methods to no avail.
This is the code I use for configuring the velocity of the projectile, the ItemUsePointTransform.forward is the transform of which the projectile is fired from
Similar threads