D
DotCodes
Guest
Hello!
I am making a game and I was wondering how to code a collision system with that is compatible with the code for my Movement system. Any help would be greatly appreciated!
I am making a game and I was wondering how to code a collision system with that is compatible with the code for my Movement system. Any help would be greatly appreciated!
Code:
hInput = keyboard_check(ord("D")) - keyboard_check(ord("A"));
vInput = keyboard_check(ord("S")) - keyboard_check(ord("W"));
if(hInput != 0 or vInput != 0){
dir = point_direction(0, 0, hInput, vInput);
moveX = lengthdir_x (spd, dir)
moveY = lengthdir_y (spd, dir)
x += moveX;
y += moveY;