bobonthenet Posted April 9, 2018 Share Posted April 9, 2018 Is there an easy way to make the player sprite collide with the edge of the camera? I'm using Matterjs physics. My game is a space shooter with an automatically scrolling camera that gradually moves from left to right across a tilemap level. Right now it is very easy to accidentally move the player outside of the viewable area. When that happens the player easily gets lost and it is hard to find your way back to the viewable area. I was thinking I could remedy this by automatically adjusting the player's velocity to match the camera scroll speed when the edge of the camera is reached. I know that would work but before I do that I would like to know if there is a simpler technique I could use. Link to comment Share on other sites More sharing options...
Lightnet Posted April 10, 2018 Share Posted April 10, 2018 I like to know about it. I only found camera follow function object but wanted to have object move around a bit. But not sure how visible check when sprite disappear when camera is following the player. Link to comment Share on other sites More sharing options...
Recommended Posts