JasonTomLee
Member
Hey GM community, was wondering how I could get the height of a sprite ( with or without precise collisions ).
The Red box represents the Mask of the player object, so the position is offset by the collided object's height.
Any methods you'd suggest?
This is what I have but doesn't work with precise collisions:
The Red box represents the Mask of the player object, so the position is offset by the collided object's height.
Any methods you'd suggest?
This is what I have but doesn't work with precise collisions:
Code:
if ( place_meeting( x,y, _obj )){
var _yoff = 0;
while( collision_point( x,y+ _yoff, _obj, true, true )){
_yoff--;
}
yoff = _yoff;
}else{
yoff = 0;
}
Attachments
-
4.6 KB Views: 9