Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by PaulB

GOT IT!

In my update I removed the old screen references but I&039;d put the #this.camera.follow( this.player ); outside the if( this.player ) { condition, so the camera was looking to update when there wasn't a player to update with.

Sorry for the premature post before!

1 decade ago by rizm

Worked like a charm.

For what it's worth, Dominic's camera class should be included in the next version of Impact. It's by far the best approach for a generic trap-based camera.

1 decade ago by CACUser

Hi - I have followed the steps to use the camera and I also see the trap, but the problem is that when the player moves the background is not moving. I wanted to use the camera for phones specially as we cannot see the full screen. Any idea why the screen is not moving along with the player as it does in biolab?

Thanks

1 decade ago by CACUser

Please ignore last mail - got it to work.

1 decade ago by Gogosin

I used Dominic's camera code, everything works fine except the camera only moves down and to the right. If I try to move back, as in to the left where I came from the camera doesn't follow me. Same thing happens if I go upwards, the camera stays down.

1 decade ago by SirPereira

Camera works great. However for it to work, I do need to specify a collision around the inner limit of the background, and I don't want my player to see the limit of the background.

I want him to collide directly with the end of the canvas viewport.

Any idea how can I achieve this?
Page 2 of 2
« first ‹ previous next › last »