0
votes
1answer
110 views

2D vector to Quaternion

I have a 2D vector (with only X and Y), and my engine only supports orientation through Quaternions. How do I translate a 2D vector to a quaternion? The X and Y represent the direction (so X = 0 ...
2
votes
0answers
255 views

Quaternion to direction vector - flipping

I've kinda solved this myself by adapting the Camera::setDirection code from OGRE to work for my need: Now I have the following code: Vector3 boneDir = getBoneWorldOrientation(mEntity, mHips) * ...
4
votes
1answer
506 views

Why game engines usually don't offer a vector3.rotate method? [closed]

Game engines like Three.js, Ogre3d and Unity3d often don't provide a default rotate method on their vector class. You usually have to do something like: rotated = vector.applyQuaternion( new ...
0
votes
3answers
331 views

How would I successfully split a vector to increase game performance?

Okay so I have a vector for all of the monsters that are spawned in my game. All of these monsters are in a single vector and are "active" according to what zone they are in relative to the player's ...