Slick Forums

Discuss the Slick 2D Library
It is currently Tue May 21, 2013 8:51 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Mar 22, 2012 11:02 am 
Offline
Slick2D Developer

Joined: Thu Mar 31, 2011 5:06 am
Posts: 239
I can't seem to figure out how to configure the camera in MarteEngine. If anyone could help me, it would be fantastic. Currently I just want to center the camera on an entity, and when they start moving say +/-100x/y from the center of the screen, I want the camera to move the world around them.

My entity extends class Entity. I am using x+=1 like code to move the entity.

_________________
Liam (liamzebedee) Edwards-Playne
Cryptum


Top
 Profile  
 
PostPosted: Thu Mar 22, 2012 1:37 pm 
Offline

Joined: Thu Mar 22, 2012 1:30 pm
Posts: 2
Hi !

I do like this :

In the class who extends World
In the update loop
Code:
if(camera == null) setCamera(new Camera(this, player, container.getWidth(), container.getHeight()));
   



Where player is my entity to follow

Hope i'm clear because i'm not english


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group