Imagination PowerVR SDK Blog

Rotation problem


#1

I want to rotate an object in my scene arround itself because it still rotate arround the initial position

any idea?


#2

Hi,



The order that you execute transformations on a given matrix will affect the outcome of those operations. If you want to rotate an object around it’s centre, you should rotate it first then translate. If you translate first, the rotation will factor in the translation that has already been applied to the matrix.



Regards,

Joe


#3

so how can I move a wheelchair in a house because it should be translated then rotate to enter in a home for example

is there any other solution?


#4

in the scope of your question ,you could for instance create an animation (model space coordinate ) where you can do what you want !!! and then get the world coordinate using GetWorldMatrix(Node);.



you can do everything you want with the sdk make sure you understand :

http://www.codinglabs.net/article_world_view_projection_matrix.aspx very well first if i may advise :slight_smile:



Kind regards

david