Sign in to follow this  

camera class

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Im a lazy guy looking for a good camera class with support for first, third and 6DoF. This needs to use quaterions, to prevent gimble's lock, and I want it to do all the rotations it self (ie, not use gluLookAt or w/e the function is..) Currently I have the 6DoF done, and am pretty sure I could fix my own first person with ease.. but the 3ed person is being tricky so figure ill be lazy and just use someone else's code lol... oh, and while im looking for code, a good article on this would also be very helpful ^^ thanks -val-

Share this post


Link to post
Share on other sites
Quote:
This needs to use quaterions, to prevent gimble's lock...
Wrong, wrong, wrong, wrong, wrong.

Sorry - I (and others) have addressed this misconception so many times on this forum that I can't help but be a bit emphatic about it :) Quaternions have no special properties with respect to gimbal lock, and you certainly don't need to use the former in order to avoid the latter. In fact, I'd recommend just sticking with matrices unless you have a good reason to do otherwise.

Share this post


Link to post
Share on other sites
Quote:
Original post by jyk
Quote:
This needs to use quaterions, to prevent gimble's lock...
Wrong, wrong, wrong, wrong, wrong.

Sorry - I (and others) have addressed this misconception so many times on this forum that I can't help but be a bit emphatic about it :) Quaternions have no special properties with respect to gimbal lock, and you certainly don't need to use the former in order to avoid the latter. In fact, I'd recommend just sticking with matrices unless you have a good reason to do otherwise.


ok.. well anyone have any examples with or without quaterions?

Share this post


Link to post
Share on other sites
In the engine I'm working on at the moment, the camera class is completely unaware of whether it is being used as a 1st or 3rd person view.

If you wanted a 3rd person view, where the camera sat a few meters behind, and orbited around the character, you'd simply attach the camera as a child of a transformation class, which in turn was attached to the character.

Share this post


Link to post
Share on other sites
It is debatable whatever it makes sense to speak for "3rd person camera" - the camera "by itself" is always 1st person. There's quite a bit of documentation on "3rd person systems", it's not as easy as sticking it a few meters behind. Good 3rd camera systems are typically more complex. Having "magnets" and "paths" is an absolute need, as well as detecting and resolving occlusion nicely.

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this