0
votes

I am playing around a bit with the PushButton Engine for game development in Flash and have come across a need for a Camera like the Camera that follows Mario in Mario Games. Flashpunk has a nice implementation of it.

Does PushButton have it out of the Box?(I searched for it and didn't find, hence the question here). If not then if any of you have written a component for the same, or can guide in the direction, any help would be much appreciated. Thanks

2

2 Answers

1
votes

There is a variable trackObject in the class DisplayObjectScene that tracks a DisplayObjectRenderer automatically.

The offical documentation says:

If set, every frame, trackObject's position is read and assigned to the scene's position, so that the scene follows the trackObject.

0
votes

I believe it does, but the camera is called the Renderer in PBE. You can set the position of the Renderer to make it track a player.