TheAngryAlterEgo
10-03-2006, 07:40 PM
I'm working on a game for a final project and I need to stop the player from moving through buildings and other items. I tested a working code that makes the player move away from an object when he gets too close in a new world and got it to work, but when I added the code to my game, the player moves either below the ground or above the objects when he gets near them.
The only difference between the codes is that in the new world I had the player moving at a certain speed while in the game he moves forward 1 meter at a time while the legs move to make the walking realistic. This doesn't seem to make a difference either way however.
http://show.imagehosting.us/show/1647272/0/nouser_1647/T1_-1_1647272.PNG (http://www.imagehosting.us/index.php?action=show&ident=1647272)
This method is brought into another method where it is copied for every object on the screen and put into a Do Together.
http://show.imagehosting.us/show/1647267/0/nouser_1647/T1_-1_1647267.PNG (http://www.imagehosting.us/index.php?action=show&ident=1647267)
This is the walking command for the player.
I tried replacing the current walk method with a Move at Speed method with no success. Is there any other way this problem can be fixed?
The only difference between the codes is that in the new world I had the player moving at a certain speed while in the game he moves forward 1 meter at a time while the legs move to make the walking realistic. This doesn't seem to make a difference either way however.
http://show.imagehosting.us/show/1647272/0/nouser_1647/T1_-1_1647272.PNG (http://www.imagehosting.us/index.php?action=show&ident=1647272)
This method is brought into another method where it is copied for every object on the screen and put into a Do Together.
http://show.imagehosting.us/show/1647267/0/nouser_1647/T1_-1_1647267.PNG (http://www.imagehosting.us/index.php?action=show&ident=1647267)
This is the walking command for the player.
I tried replacing the current walk method with a Move at Speed method with no success. Is there any other way this problem can be fixed?