• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - Code Using place_meeting on different collision mask types

A

aflesher

Guest
I'm not exactly sure if this is a bug or just something I don't understand about collision masks.

- I have a character that has a collision mask of type Rectangle (Fast).
- I am checking if this character collides with an object that has a collision mask of type Precise (Slow)
- I've been using image_xscale to display the character facing left or right
- When the character is facing facing this object place_meeting returns false, when facing away it returns true.
- This is the test I ran when I started getting unexpected collisions with this object

Code:
image_xscale = 1;
trace("r", place_meeting(x, y, oBlock), bbox_left, bbox_right, bbox_top, bbox_bottom, x, y);
image_xscale = -1;
trace("l", place_meeting(x, y, oBlock), bbox_left, bbox_right, bbox_top, bbox_bottom, x, y);
and the resulting output

Code:
r, 1, 1079, 1130, 953, 1019, 1105, 971.40
l, 0, 1079, 1130, 953, 1019, 1105, 971.40
So if the bbox and x,y values aren't changing then when does the placing_meeting return true when the image_xscale = 1 and false when image_xscale = -1
 
Top