Transform Forward not working properly when rotating character (lean)

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

Ive tried gizmos for drawing the ray, the ray displays the correct information of drawing where the projectile lands, but it is still not accurate. Again, about ~5% of the time, a projectile will land at the correct location, there is no projectile spread / inaccuracies involved, and only occurs while leaning

Just updated editor version from 2021.3.5f1 → 2021.3.15f1, bug is still here