# Rotation, again!

This topic is 3865 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have, as everyone else seems to have, a rotation problem! Ive been reading on the forum and on resources on the internet(s) about rotation - but I just cant get my head around this "error" Im getting. Green arrow is my orientation of my Enitity. Blue dot is the goal-orientation that I want my Entity to be facing (green arrow). Then thing is that my Entity does not change its facing. Here is some code to show you how I make my error. www.catamarana.com/cpp/?id=29

##### Share on other sites
I didn't look that closely, but this looks wrong:
world = rot * trans;
rot appears to be a relative rotation (i.e. a fairly small local rotation), but you're using it to build the world/model matrix for the object. I would think this would result in a near-constant orientation for your object (which seems to be what you're observing).

To get the correct orientation, you need to build a rotation matrix from the current forward vector (this is kind of a roundabout way of doing it, but I'd try to get this version working before considering any further revisions).