D
Dennis Wiklund
Guest
Hi!
I have tried a lot of ways of getting a specific game-mechanic to work and i cant for the life of me figure it out.
Heres the thing.
I want a game were you as a player drag your character over the screen with the mouse (later touch with ios).
Just like this:
The idea is that when the character is released he will fall to the ground and stay there.
My problem is that I can't figure out a smart way to make it collide with walls (during drag). I dont want the player to drag the object through walls or obstacles.
I can make it so when the character hits the wall it falls down and gets disconected from the mouse-cursor. But i want it wo slide along the walls of the cursor is on the other side of the wall.
I tried using physics, but that doesnt work since i have to set:
phy_position_x = mouse_x;
and this overwrites the collission.
Any good ideas of how to get this working?
(Sorry for bad eng, i did not pay attention in school obviusly).
Cheers!
Dennis
I have tried a lot of ways of getting a specific game-mechanic to work and i cant for the life of me figure it out.
Heres the thing.
I want a game were you as a player drag your character over the screen with the mouse (later touch with ios).
Just like this:
The idea is that when the character is released he will fall to the ground and stay there.
My problem is that I can't figure out a smart way to make it collide with walls (during drag). I dont want the player to drag the object through walls or obstacles.
I can make it so when the character hits the wall it falls down and gets disconected from the mouse-cursor. But i want it wo slide along the walls of the cursor is on the other side of the wall.
I tried using physics, but that doesnt work since i have to set:
phy_position_x = mouse_x;
and this overwrites the collission.
Any good ideas of how to get this working?
(Sorry for bad eng, i did not pay attention in school obviusly).
Cheers!
Dennis
Last edited by a moderator: