Hot answers tagged

4 votes
Accepted

How do I create a localtoworldmatrix and worldtolocalmatrix in Godot?

In Godot a Transform3D has no concept of local or world. They are transformations between spaces, and what those spaces are depend on how you use them. For a ...
Theraot's user avatar
  • 25.1k
1 vote
Accepted

How to set up view and model matrices for 3D rendering?

The model matrix converts from object space to world space, so it represents the position, rotation, and scale of the object relative to the world origin. The view matrix converts from world space to ...
DMGregory's user avatar
  • 132k
1 vote

Align two meshes given 2 faces

This is a bit easier if you have a quaternion "look rotation" method handy, but I don't see one in the library you're using, so I'll describe the algorithm in high level pseudocode and you ...
DMGregory's user avatar
  • 132k
1 vote
Accepted

Implementing a Maya-like orbit camera in Vulkan/OpenGL

Today, I found the solution. The answer was straightforward: just multiply X and Z by the camera vectors. Hence, the right vector at the starting location is 1, 0, 0, as well as 0, 0, -1 for the dir ...
Wusiki Jeronii's user avatar
1 vote
Accepted

correct matrix to draw mesh as flat object

As suggested by DMGregory, setting cullmode to none ensures that the inverted Y axis by scaling does not cull away objects. Note: It would be even better to just invert the cullmode, e.g. setting it ...
codymanix's user avatar
  • 364
1 vote

Extract a rotation matrix given a camera direction (vector) and a up vector for the camera?

As python code (assumes x to the right and y down in camera space): ...
LC117's user avatar
  • 111

Only top scored, non community-wiki answers of a minimum length are eligible