Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: First Person 3D Camera?  (Read 6137 times)

0 Members and 1 Guest are viewing this topic.

ezio160324

  • Newbie
  • *
  • Posts: 11
    • View Profile
First Person 3D Camera?
« on: July 15, 2014, 11:08:56 am »
Hey. I'm wondering if anyone has made anything to help with a 3D first person camera. I saw sf3d but it's not for SFML 2.  :( Anyway, if nobody has done such a thing, can you give me some pointers on where to start?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: First Person 3D Camera?
« Reply #1 on: July 15, 2014, 11:41:20 am »
As soon as you want to go 3D with SFML, you'll have to start using OpenGL. If you don't know OpenGL yet, you should start learning it.

If you just want some simple 3D shapes, you could also look at binary1248's 3DEE fork.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ezio160324

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: First Person 3D Camera?
« Reply #2 on: July 15, 2014, 12:20:57 pm »
Thanks. That should help until I get ready to do some real rendering. And yeah, I have learned a little OpenGL. I'm still learning.

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: First Person 3D Camera?
« Reply #3 on: July 15, 2014, 12:52:04 pm »
I made a framework based on SFML which supports first person camera via a 3D scene graph. It doesn't use very modern openGL, but you should be able to extract it from the 'mesh' folder (don't forget the headers in /include). There're no docs though, so you'll have to try and figure it out from the comments

ezio160324

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: First Person 3D Camera?
« Reply #4 on: July 15, 2014, 01:04:57 pm »
I made a framework based on SFML which supports first person camera via a 3D scene graph. It doesn't use very modern openGL, but you should be able to extract it from the 'mesh' folder (don't forget the headers in /include). There're no docs though, so you'll have to try and figure it out from the comments

Does it really require Box2D? Cuz I'm using Bullet for physics.  :-\

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: First Person 3D Camera?
« Reply #5 on: July 15, 2014, 01:46:01 pm »
No, only if you plan to use the whole framework. Everything in the mesh folder should drop into another project, or compile as a lib

ezio160324

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: First Person 3D Camera?
« Reply #6 on: July 15, 2014, 01:52:37 pm »
I see. I did try it, it didn't work. Could it be because I'm on Windows 8.1 using VS 2013?  :-[

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: First Person 3D Camera?
« Reply #7 on: July 15, 2014, 02:31:41 pm »
I see. I did try it, it didn't work. Could it be because I'm on Windows 8.1 using VS 2013?  :-[

Like we can read your mind and figure out what the issue is.....
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: First Person 3D Camera?
« Reply #8 on: July 15, 2014, 02:38:02 pm »
Could be any number of things, you'll have to scour the code thoroughly. I know it depends on glu and glm for one thing. If you can't find what you need in the code have you looked at this? It has added 3D support.

ezio160324

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: First Person 3D Camera?
« Reply #9 on: July 16, 2014, 02:27:06 pm »
Could be any number of things, you'll have to scour the code thoroughly. I know it depends on glu and glm for one thing. If you can't find what you need in the code have you looked at this? It has added 3D support.

Wow, got it working. Thanks so much. Now to get to work on my skybox......

EDIT: Well, I'm trying to limit the vertical rotation. It's not working. I copied the camera code from the 3d.cpp file at the link.  :-\ I am at a loss.
« Last Edit: July 16, 2014, 07:53:07 pm by ezio160324 »