help with walls

Game Editor comments and discussion.

help with walls

Postby crazypotato » Sun Nov 25, 2007 8:12 pm

how do you keep an actor from moving through walls when it is being controlled by a player? I think physical response is the key but I'm not sure how...
Crazy Potato and Friends :-D

Website coming soon!!! videos, comics, games(of course), and our charecter CRAZY POTATO!!!!!!!!

Hopefully at "thecrazypotato.com"
crazypotato
 
Posts: 6
Joined: Sat Oct 06, 2007 2:25 pm
Score: 0 Give a positive score

Re: help with walls

Postby tufif » Tue Nov 27, 2007 2:48 pm

I was having trouble with this in my game, so I made an actor that was just like the walls only thicker and hid it behind the background so you can't see it. That way in the game you see nice thin walls, but the player is reacting to thicker walls that it can't go through but that you never see.
tufif
 
Posts: 22
Joined: Sat Oct 13, 2007 3:00 am
Score: 2 Give a positive score

Re: help with walls

Postby Troodon » Tue Nov 27, 2007 6:06 pm

Note: the physical response works when you collide with the wall, but you never collide with the wall if you move fast enough. Lol, this isn't modern physics, this is because if you move at xvelocity = 4, then your actor moves only in every four pixel. Like this

[X][][][][][][][][][]WALL
[][][][][X][][][][][]WALL
[][][][][][][][][X][]WALL
[][][][][][][][][][]WALL[][][X]

As you can see it never touches the wall. Of course in this example the wall is just one pixel thick. The bigger, the "stronger" it is.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron