SFML community forums

General => General discussions => Topic started by: Mars_999 on April 30, 2012, 06:19:07 am

Title: Camera class?
Post by: Mars_999 on April 30, 2012, 06:19:07 am
Anyone here made a camera lib that works with OpenGL to use with SFML or Thor? that is allows 1st,3rd, free roam, ect... style of cameras to be used?

And has other functionality such as follow object, turn over time ect....

Thanks!
Title: Re: Camera class?
Post by: Lo-X on April 30, 2012, 02:07:02 pm
That's your job to do such a thing, using a sf::View. Attach a camera to a entity is highly dependent on your ame engine.
I've a class Camera that can turn or translate over time but I've to re write it wih the new SFML conventions, and this class is very easy to implement by yoursef (You only need to store the angle or position target, one or two boleeans, the speed and update the camera at each loop)
Title: Re: Camera class?
Post by: Mars_999 on May 01, 2012, 01:31:32 am
How is sf::View supposed to work with 3D? It's says it is only for 2D.... or are you meaning make a class like it...
Title: Re: Camera class?
Post by: eXpl0it3r on May 01, 2012, 02:52:45 am
How is sf::View supposed to work with 3D?
And how should we know you're looking for a 3D camera? I mean "that is allows 1st,3rd, free roam, ect..." seems to me like randomly connected words. :-[
Title: Re: Camera class?
Post by: Lo-X on May 01, 2012, 03:10:46 am
Sorry but I haven't seen anything in your post wich leads me to think it was for 3D (in the context, now yes). I think the most people here works with 2D. If I'm not wrong, Ogre implements a Camera. You should check it out.
Title: Re: Camera class?
Post by: Mars_999 on May 01, 2012, 03:24:10 am
Yes I see it's my bad for assuming everyone would assume I was working in 3D.... Anyway thanks for all the help. I will look around. Was hoping someone had a lib for this as their is one for everything else under the sun....