View Issue Details

IDProjectCategoryView StatusLast Update
0027545RunnerGeneralPublic2018-02-07 14:52
ReporterStewart BishopAssigned ToChris Harrison 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
Product Version 
Target VersionFixed in Version 
Summary0027545: General: Rotated and/or scaled hitboxes look right but have their collisions wrong
DescriptionWhen at least one object is rotated, the hitboxes of two objects seem to misunderstand each other. What I tried doing is having a scaled and rotated hitbox collide with a standard rectangular hitbox (like a laser hitting enemies). What happens now is that sometimes the hitbox of the rotated object hits targets that are not even within reach. It seems as if the collision mask of the rotated object is calculated to be somewhere it actually isn't. But at the same time it's invisibly stretched much bigger than it should be. By using draw_self(); you can see that, even though the hitboxes aren't touching each other, at some points the game reacts as if they are.
I've tried several things to find a way around this problem, or to identify what is going on. Among my attempts were: not scaling the objects anymore, setting precises collision masks for one or both of the objects, changing the sprite_indexes... But although there were some minor differences which made no sense either, nothing actually lead to the right result.

After some more testing it turns out that the problem most likely lies in scaling up and the origin points. If the origin point is in the center the sprite will scale up in all directions as it should, but the invisible hitbox scales in the wrong directions (right and down).
Steps To Reproduce1) Import attached project
2) Run it
3) Place cursor on the dot
4) Square will rotate with no collisions
5) Click to change collision type
6) See that whilst scaled up is specified there are collisions
1.4 Found In
2.x Runtime Found In2.1.0.135
2.x Runtime Verified In

Activities

Stewart Bishop

2017-08-24 17:42

Adminstrator  

Collision Bug When Scaling Up.yyz (26,110 bytes)