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 ...
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 ...
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 ...
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 ...
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 ...
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):
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
matrix × 594opengl × 135
mathematics × 130
transformation × 108
rotation × 86
3d × 82
xna × 65
camera × 63
c# × 49
projection × 44
vector × 41
c++ × 37
linear-algebra × 33
coordinates × 27
2d × 26
unity × 25
quaternion × 24
directx × 23
shaders × 22
glm × 20
skeletal-animation × 18
projection-matrix × 18
java × 17
directx11 × 17
glsl × 16