Relative Local Direction from World direction

Read a lot but cannot find proper solution to solve this problem.

Want to get a relative local direction from world direction, based on a rotation.

Multiplying Quaternion * Vector will produce a rotated vector.

If you have a Transform, you could also use Transform.InverseTransformDirection

This is generally true. Though to convert a direction vector from world space to local space you want to use the inverse of the rotation

Vector3 localSpaceDir = Quaternion.Inverse(yourRotation) * worldSpaceDir

here yourRotation would be the rotation that rotates from local to world space as usual.

It is working .Thank you so much. Much appreciated. <3

What should I do to learn this type of stuff by myself? Any tip about it? I feel so lost with vectors and quaternions functions for applications :frowning: