Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Game Camera? — Gideros Forum

Game Camera?

Louie999Louie999 Member
edited June 2015 in General questions
Is there a way to create a camera for the game? or is it already implemented?

Comments

  • jdbcjdbc Member
    edited June 2015
    I have used Camera class with Box2d in my car racing prototype:

    https://github.com/jdbcdev/topdown_racing
    https://github.com/jdbcdev/topdown_racing/blob/master/classes/camera.lua




    Just use this lua code to create:
      -- Create box2d camera following car player
      local camera = Camera.new(self)
      self.camera = camera
      camera:update()
    and update camera object in every Event.ENTER_FRAME callback
      self.camera:update()
  • Thx guys for the answers :)
Sign In or Register to comment.