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

Author Topic: [Solved] 3D camera and events  (Read 2311 times)

0 Members and 1 Guest are viewing this topic.

TMKCodes

  • Newbie
  • *
  • Posts: 11
    • View Profile
[Solved] 3D camera and events
« on: June 17, 2010, 12:22:10 am »
Okey.. I was writing bit of 3D and my camera went kind of crazy. I've written events to move the camera, but when i click on a key it keeps going on and if i click it again it goes faster and if i click reverse it slows down. Seems like the events are going into loop or something. Remember. It keeps going forever, been trying to debug this for few hours now, like once i press key it stays down. :P

Here's my code http://codepad.org/9NpiXuGg

Kingdom of Fish

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
[Solved] 3D camera and events
« Reply #1 on: June 17, 2010, 02:34:24 am »
Well, first of all, you are using global variables. I mean no disrespect but you really should go back and learn C++ (simple terminal stuff). Once you have a variable outside the current scope it won't reset until you tell it too.

And also, DO NOT use global variables... never...

TMKCodes

  • Newbie
  • *
  • Posts: 11
    • View Profile
[Solved] 3D camera and events
« Reply #2 on: June 17, 2010, 03:05:22 am »
Seriously dude. There's nothing wrong with global variables, but yes thank you. They were not nulling.