Hello. I have an image with width=45 and height=20, I need to use it for for platform-objects in my game. This code is ok to use whole image as hitbox:
setHitbox(45, 20);
But actually this picture is isometric so I need hitbox with size = (40,20) and x-offset = 5 (I want player to be able to go through leftmost 5x20 area of platform). So I tried this
setHitbox(40, 20, 5);
and this
setHitbox(40, 20, 25);
and so on. Results are always wierd, collision system goes completely crazy. Please help me to properly set hitbox.
P.S. sorry for my english.