Help With Viewport!

42 views
Skip to first unread message

Deep R. Ode

unread,
May 16, 2013, 12:34:16 PM5/16/13
to craf...@googlegroups.com
I have 1 entity with .fourway, it can move easily around the map... but next map is gonna bigger and i want to focus on player means camera should go where player goes, how can i do it? If you haven't understand, it is like when mario goes ahead, next part of levels appear. And to be more correct, same as pokemon. Do i use  Viewport for it? Pls explain....it would be nice if you can post jsfiddle or example. 

Matt Petrovic

unread,
May 16, 2013, 12:34:56 PM5/16/13
to craf...@googlegroups.com
Crafty.viewport.follow(player_entity)


On Thu, May 16, 2013 at 12:34 PM, Deep R. Ode <ashde...@gmail.com> wrote:
I have 1 entity with .fourway, it can move easily around the map... but next map is gonna bigger and i want to focus on player means camera should go where player goes, how can i do it? If you haven't understand, it is like when mario goes ahead, next part of levels appear. And to be more correct, same as pokemon. Do i use  Viewport for it? Pls explain....it would be nice if you can post jsfiddle or example. 

--
You received this message because you are subscribed to the Google Groups "Crafty" group.
To unsubscribe from this group and stop receiving emails from it, send an email to craftyjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Deep R. Ode

unread,
May 17, 2013, 4:23:21 AM5/17/13
to craf...@googlegroups.com, mpet...@guneva.net
Thanks.
Reply all
Reply to author
Forward
0 new messages