-
Collision Isuues
Hi,
I am working on a game that does not use Clickteam's movements. I am looking for a way to have my objects collide with something and then have them stop and still be able to move. Any ideas or suggestions? Also, my game is NOT grid based so that also puts me at sort of a disadvantage.
-Thanks, Variant
-
Re: Collision Isuues
You back the object out manually. For example, if the character is moving Right and overlaps an obsticle set the x of player x -1 after the player stops.
It is also best to use a collision box, always place the character at 0,0 in the box, and move the collision box and not the character.
Marv
-
Re: Collision Isuues
That's a great idea, but I am not sure how it could be done. Do you have an example perhaps? Also, my player rotates, so the collision box itself could not be moving.
-Variant
-
Re: Collision Isuues
My custom movement example backs the collision box away from the frame sides. I also have other examples that contain character movement.
Why can't you use a collision box. Your player rotating should have no effect, unless your hot spots are all over the place. You can still rotate your player even though the movement is to the box. That metod is even better still if your character rotates. That way the player can't get stuck in a wall or off the screen, or in a backdrop.
Marv
-
Re: Collision Isuues
I suppose I could try it, by the way which of your examples are you referring to?
EDIT:
Also, the collision mask has to be divisible by the frame size right?
EDIT AGAIN:
And my player is moved by the mouse and uses the MoveIt extension. I really don't know how this will work.
-Thanks, Variant
-
Re: Collision Isuues
Not sure either, because I do a lot of custom movement and fastloop movement stuff. I don't know about "the collision mask has to be divisible by the frame size" mumbo jumbo". No, a collision box is just a square box that your character is centered in, and you set the movement to the box, no matter what method you are using to move it. That way when a character rotates the arms and legs don't get stuck.
Marv
-
Re: Collision Isuues
Okay, I managed to get the player to stop, but if you force him to move towards the point he will bounce off the object. I don't really want my player to bounce. Any ideas?
-Thanks, Variant