I have a track that the player moves through, it is straight but at an angle… like this shape:
//
//
//
//
I drew the track in photoshop and then imported it as the background image. I was wondering if anyone can give me guidance on how to make it so the player can not move past the boundary on the left and right, such as a relevant video tutorial. I can’t use x / y restriction because like I said it is not a track that goes straight on the x or y axis
I wondering if you can use an overlay image that’s just black and white or even alpha and depending on which colour pixel the player is on would determine if he can move or not? im not so good at unity so i don’t know what code you would use for that sort of thing. Other than that, I would recommend using a simple invisible mesh on your track that has colliders on it to physically stop the character moving from side to side.