I'm using 8direction behavior. The solids are a tilemap. How can I add corner cutting (clipping through corners) without changing the collision boxes? (which are all currently squares)
If I changed the hitboxes to remove corners like this, then the player will just hit the corner of the tilemap and not move. Moving into it diagonally like that should not stop you and should act like normal squares. Keeping this in mind, corner cutting should still be possible
Go ahead and change the collision poly.
Clamp the area
When moving:
set x to Clamp(self.x,0-offset,layoutwidth+offset)
set y to Clamp(self.y,0+offset,layoutheight-offset)
can you elaborate on what 'offset' is please?
You have to take the hotspot into account otherwise half of the object will be across the clamped line.
Usually the size divided by two.
Develop games in your browser. Powerful, performant & highly capable.
thank you!