Jump to content

  • Log In with Google      Sign In   
  • Create Account


OpenGL 2D Camera


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 povilaslt2   Members   -  Reputation: 201

Like
0Likes
Like

Posted 17 June 2013 - 09:43 AM

Hello, i have problem with my OpenGL 2D camera. I try to do when camera reaches max 'X' he locks and can't move further. I don't know how to accurately explain my problem.

 

Here's the code:

 

if ( (( player.x + cubes[LastBlock].x ) - CameraPos[0]) >= GetX( cubes ) + CameraPos[0])
                    CameraPos[0] = LastCameraPos[0];

 

GetX function finds highest 'X'.


Edited by povilaslt2, 17 June 2013 - 12:46 PM.


Sponsor:

#2 _greyfox()   Members   -  Reputation: 1133

Like
0Likes
Like

Posted 17 June 2013 - 12:14 PM

Sveikas, cia angliskas forumas, todel jeigu rasysiu lietuviskai tai forumieciams gali nepatikti, todel rasysiu angliskai. Jei nori, personal message parasyk, padesiu ka reikia.

 

It would help us if you could explain what exactly is your problem.

 

It would be nice if you could upload your full source code here. Because I don't know what GetX function returns, what array of cubes hold , and what exactly does CameraPos array hold? Also LastBlock is not a function as far as I can see, it's some kind of variable. I'm sure it was just a typo.


“There are thousands and thousands of people out there leading lives of quiet, screaming desperation, where they work long, hard hours at jobs they hate to enable them to buy things they don't need to impress people they don't like.”― Nigel Marsh

#3 povilaslt2   Members   -  Reputation: 201

Like
0Likes
Like

Posted 18 June 2013 - 03:07 AM

Solved, thanks






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS