worldToLocal
worldToLocal is a transformation operation that converts coordinates from world space into an object's local coordinate space. It is typically realized by applying the inverse of the object's world transform matrix. If a point in world space is P_world, the corresponding local coordinates are obtained as P_local = M_world^{-1} * P_world, where M_world is the 4x4 matrix representing the object's position, rotation, and scale in the world. For directions or vectors, you use a homogeneous coordinate with a zero w component to avoid translating the vector.
In practice, many graphics and game engines provide utilities to perform this operation directly, such as inverse
Common uses include hit testing and raycasting in local space, transforming points for physics calculations, animation
Overall, worldToLocal is a fundamental tool for interpreting world-position data within the context of an individual