B
BulletHell1
Guest
Hi, I'm having an issue with precise collision in my platform game when my player collides with a spike when falling from a jump. I have made it so the character is destroyed upon collision however the character currently collides way too early before actual contact (around here: https://imgur.com/a/ebFzu)
Other collisions (horizontal and collision with an object above) seem to work fine, but falling collision has this issue. I have attempted to edit the ''precise'' settings in the sprite editor but this did not fix the problem. Is there a way to make it so the collision is precise?
Here's my code:
Variables:
grav = 1;
spd = 8;
jspd = 12;
hspd = 0;
vspd = 0;
airjump = 1;
My platform physics can be found here: http://pastebin.com/h6RqwdE0
And my collision code, upon contact with the spike:
///Destroy object
instance_destroy();
I'm trying to create a game similar to IWBTG with really precise jumps, but having tried things like altering the masks for both the player and the spike objects (currently mask shapes are set to precise) I am still struggling to get the desired effect. Could anyone help me?
Other collisions (horizontal and collision with an object above) seem to work fine, but falling collision has this issue. I have attempted to edit the ''precise'' settings in the sprite editor but this did not fix the problem. Is there a way to make it so the collision is precise?
Here's my code:
Variables:
grav = 1;
spd = 8;
jspd = 12;
hspd = 0;
vspd = 0;
airjump = 1;
My platform physics can be found here: http://pastebin.com/h6RqwdE0
And my collision code, upon contact with the spike:
///Destroy object
instance_destroy();
I'm trying to create a game similar to IWBTG with really precise jumps, but having tried things like altering the masks for both the player and the spike objects (currently mask shapes are set to precise) I am still struggling to get the desired effect. Could anyone help me?