Hi! I'm new to the forums. How would I go about making my game where it scrolls with the player but stays within the boundaries of a room that is not rectangular?
Printable View
Hi! I'm new to the forums. How would I go about making my game where it scrolls with the player but stays within the boundaries of a room that is not rectangular?
Hi there.
Depending on exactly what you're doing this might be an easy or needlessly difficult way to do it, but you could create a new object to act as the camera (rather than setting the scrolling directly on the player) and have it always set itself to the position of the player unless certain conditions are met - for example, colliding with invisible barries that you've set up to prevent scrolling from going too far in that direction, or just going over or under a certain X/Y co-ordinate.
Okay. I will try that.
I finally got it to work. Thanks for the info.
You're welcome - and welcome to the forum!