R
raindev04
Guest
Hello there! I have an issue that kept me in front of the PC for 2 days long..
I have a simple gamepad-based movement in any direction.
Basically it is something like that:
And it works perfectly fine with any collision whose mask is squared/rectangled. BUT for collisions (precise) in diagonal, the animation looks so jaggy.. I use only square/rectangle collision mask and half squares like that:
Nothing more. But with those, I have some issues.
I don't know how to explain it better, but I wonder if someone could give me some tips on how I can concern with that.. Obviously if you didn't understand something, just ask and I'll try to explain better.
Thanks in advance!
I have a simple gamepad-based movement in any direction.
Basically it is something like that:
Code:
horComp = gamepad_axis_value(0, gp_axislh);
verComp = gamepad_axis_value(0, gp_axislv);
// after some unimportant controls...
if (place_free(x+(sign(horComp)*spd),y)) {
x += horComp*spd;
}
if (place_free(x,y+(sign(verComp)*spd))) {
y += verComp*spd;
}
Nothing more. But with those, I have some issues.
I don't know how to explain it better, but I wonder if someone could give me some tips on how I can concern with that.. Obviously if you didn't understand something, just ask and I'll try to explain better.
Thanks in advance!