Problem in roll[SOLVED]

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
User avatar
Freedom911
Gnoblar
Posts: 11
Joined: Mon Sep 15, 2014 12:28 pm
Location: On Earth -_-

Problem in roll[SOLVED]

Post by Freedom911 »

Hello guys .I am facing problem with roll .
When I write

Code: Select all

headNode->roll(Ogre::Degree(90));

then the ogre head should rotate 90 degree clockwise but it is rotating 90 degree anticlockwise.I have attached the photo of it .It would be nice if someone explains it :) also +90 degree means rotation in anticlockwise direction in vectors then why does ogre uses clockwise .
Attachments
Untitled(1).jpg
Last edited by Freedom911 on Sat Sep 20, 2014 1:38 pm, edited 1 time in total.
User avatar
Freedom911
Gnoblar
Posts: 11
Joined: Mon Sep 15, 2014 12:28 pm
Location: On Earth -_-

Re: Problem in roll

Post by Freedom911 »

Thanks for the reply but I didn't get it :? +90 means positive rotation around z axis means clockwise so ogre head should me rotated clockwise like in this pic
User avatar
Freedom911
Gnoblar
Posts: 11
Joined: Mon Sep 15, 2014 12:28 pm
Location: On Earth -_-

Re: Problem in roll

Post by Freedom911 »

Oh i got it thanks :D
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Problem in roll

Post by Kojack »

Ogre uses a right handed coordinate system with +z pointing back and +Y pointing up.
The easy way to remember how the rotations work in a right handed system is to aim your right thumb in the direction of the axis you want to rotate around. The direction your fingers curl to make a fist is the direction of a positive rotation. So for a roll (rotation around +Z), aim your right thumb at yourself. Your fingers are curling anticlockwise.
Post Reply