- Home /
How can I construct a 4x4 rotation matrix to look in the direction of a Vector4?
I have two Vector4s, representing points in four dimensional space, and I need to rotate an object to point from one to the other.
Every solution to similar problems that I've seen only works in three space.
Ideally I would like an efficient solution, as this operation will need to be done every frame, possibly for multiple objects.
The fourth dimension is time, therefore you use the normal, 3 dimensional matrix and then something else for the fourth dimension. (Now I'm curious... what do you need Vector4's for??)
I've added a fourth spacial dimension, that is why I'm using Vector4s and that's why I need a 4x4 matrix.
Thats what I'm curious about. 4 dimentional space does not exist. By all means you need way more than quaternions to represent your rotation. $$anonymous$$eaning you will not only have to come up with a 4 dimentional rotation matrix, but also a way of even having rotation in four dimentional space.
No offence, but how is four dimentional space usefull, when you can only render in 3d space?
Information like this is btw very useful to other people when they try to answer your question ;)
I created a way to render 4d objects. Once I have something good enough to show off, I'll make sure to post in the forums.
The rotation is actually fairly simple, you just multiply a Vector4 by the 4x4 rotation matrix. Do that for each vertex and you are set.
But you first need that matrix, which is not simple :)
It seems like you really need to explain more about how your 4 dimensional space works, before it's possible to come up with a matrix. (But I might be totally wrong there)