You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a somewhat traditional scene setup, my camera has an associated transform (i.e. the model matrix of the camera node), and then I derive the view matrix by inverting the model matrix.
Most examples I see using cgmath are assembling their view matrix by hand, which is fine, but it means that the look_at _* functions all produce view matrices. If I wanted a look_at equivalent for placing objects (i.e. their model matrices) in the scene, what's my best option?
I can obviously just call look_at_*().invert().unwrap() which is fine for now, but it feels like there could be a cleaner option
The text was updated successfully, but these errors were encountered:
After all, the function is about "look", it implies the camera.
Lots of types of objects have an intrinsic "look" direction. Characters, spaceships, guns, and so on. But regardless of what it ends up being named, an "align object to face a point" function would be very useful.
In a somewhat traditional scene setup, my camera has an associated transform (i.e. the model matrix of the camera node), and then I derive the view matrix by inverting the model matrix.
Most examples I see using cgmath are assembling their view matrix by hand, which is fine, but it means that the
look_at _*
functions all produce view matrices. If I wanted a look_at equivalent for placing objects (i.e. their model matrices) in the scene, what's my best option?I can obviously just call
look_at_*().invert().unwrap()
which is fine for now, but it feels like there could be a cleaner optionThe text was updated successfully, but these errors were encountered: