Camera bug ? Or ?

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
Kristian
Hobgoblin
Posts: 542
Joined: Sun Jan 12, 2003 7:35 pm
Location: Copenhagen, Denmark

Camera bug ? Or ?

Post by Kristian »

When I set the position of the camera to 0,80,0 and are looking at the point 0,0,0 my entity doesnt seem to be rendered but when i change the look at position to something like 0.02, 0, 0.02 it seem to work allright.
Is this a bug or is it something else ?
Kristian, crying out loud: "If it works. Don't fix it!" :p
HCA
HCA2
GuppyLife

User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 6
Contact:

Post by haffax »

How far away the near-clip-plane of your camera?
team-pantheon programmer
creators of Rastullahs Lockenpracht

User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

This could be a problem with what is defined as the camera's 'up' vector. It's impossible to determine the orientation of the camera if you look parallel to the up vector, which you do in this case. (There are an infinite number of possible rotations around the y-axis.)

I don't know from the top of my head whether you can specify the up vector manually (didn't find it in the API ref). Otherwise you'll have to build the orientation for this case yourself, I think.

User avatar
Kristian
Hobgoblin
Posts: 542
Joined: Sun Jan 12, 2003 7:35 pm
Location: Copenhagen, Denmark

Post by Kristian »

is this what is known as gimbal lock ? occuring on the camera ?

As I recall the near clip set on the camera has a value of 5.0.
Kristian, crying out loud: "If it works. Don't fix it!" :p
HCA
HCA2
GuppyLife

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Post by sinbad »

You're looking directly along the Y axis with fixed yaw still set to Y (the standard FPS style camera). There are an infinite number of solutions that way. Turn off fixed yaw (Camera::setFixedYaw(false)) or don't look directly along the Y axis

Post Reply