C
Conlee
Guest
I have been using an extremely simple collision/control system I found from this video. I am unsure if it is outdated.
For some strange reason, when my character is descending and touches the ground again, sometimes the character will levitate a minuscule amount off the ground. During this time, jumping and horizontal movement still works. My sprites are centered.
Here is the code for the vertical collisions. It is within a step event; vsp is vertical speed and obj_floor is the floor. The rest of the code can be found in the video, but I can post it here if needed.
The player sprite is 44*92 and the floor objects are 64*64.
It is very apparent here.
Again, it is ever so slightly above the floor.
Here is a picture of the collisions working properly.
If can can provide more information if needed.
For some strange reason, when my character is descending and touches the ground again, sometimes the character will levitate a minuscule amount off the ground. During this time, jumping and horizontal movement still works. My sprites are centered.
Here is the code for the vertical collisions. It is within a step event; vsp is vertical speed and obj_floor is the floor. The rest of the code can be found in the video, but I can post it here if needed.
Code:
if (place_meeting(x, y+vsp, obj_floor))
{
while(!place_meeting(x,y+sign(vsp),obj_floor))
{
y += sign(vsp);
}
vsp = 0;
}
It is very apparent here.
Again, it is ever so slightly above the floor.
Here is a picture of the collisions working properly.
If can can provide more information if needed.
Last edited by a moderator: