L
LilRony
Guest
I can't find any confirmation on this, but I hear that place_meeting() should only be used when checking for instances at a direction, while collision events are better for collision in general. Is this right?
Okay, thank you for the answer. To build on that, how much should collision be limited? My profiler says that place_meeting() registers at about 20% for just the player, which seems way too high considering the framerate I was getting...Each function is having a reason.
If you just want to know if you collide or not --> use place_meeting() because that function will return 1 or 0 (true or false).
If you need to interact with what you collide with, use the "collision" family as they will return the instance ID of what they collide with. Collision functions are also great for "special collisions" where you only want to check a dot, a line, a shape, etc
A collision event if is like place_meeting. If it collides, the code in that event will be read and executed.
place_meeting checks everypixel of the collision mask to the opposite instance spoken of. position_meeting checks a single pixel. place_meeting is fast if you use collision boundings vs per-pixel checking. The added advantages is that you control exactly when to check for said instance instead of checks being run on every instance everyframe just for the collision_event handler to even exist.Yeah, I've been wondering too If place_meeting() is just for checking if the given instance has been collided on THAT POSITION... but the Collision Event is for everything...