ban885
Member
I Am working on a TopDown Game, and seem to be horrible with collisions
collision event with a wall
is the closest thing i could get to without it passing through the wall but, the object gets stuck when rotating in another direction.
I have Tried changed the collision mask and messing with that but non of the results are what I wanted.
^tried this works great for like enemies when they collide with other things but for some reason it doesn't work on the character lol.
////////////////////////////////////////////////////
^ this is what i have for a movement code
Starting to think i might need to use rectangle collision, now i am not using x or y values for speed or hspeed or vspeed.
just using the standard gml speed variable which I hear isn't good to use.
anyone have suggestions or should i probably switch and try rectangle collision.
collision event with a wall
GML:
if place_meeting(x,y,Wall)
{
x = xprevious
y = yprevious
}
tried changing the x and y values
[CODE=gml]if place_meeting(x,+1,y+1,Wall)
{
x = xprevious
y = yprevious
}
[CODE]
if place_meeting(x-1,y-1,Wall)
{
x = xprevious
y = yprevious
}
I have Tried changed the collision mask and messing with that but non of the results are what I wanted.
Code:
direction = point_direction(x,y,other.x,other.y)+180
////////////////////////////////////////////////////
Code:
if keyboard_check_direct(ord("W"))
{
move_towards_point(mouse_x,mouse_y,1)
direction = point_direction(x,y,mouse_x,mouse_y)
}
Starting to think i might need to use rectangle collision, now i am not using x or y values for speed or hspeed or vspeed.
just using the standard gml speed variable which I hear isn't good to use.
anyone have suggestions or should i probably switch and try rectangle collision.