This site requires JavaScript, please enable it in your browser!
Greenfoot back
davemib123
davemib123 wrote ...

2013/11/16

colliding with bottom of a platform

davemib123 davemib123

2013/11/16

#
Hi, I have managed to work out a method in checking collisions between the hero and a platform for left and right using this within the movement keys:
else if (Greenfoot.isKeyDown("right"))
        {
            walkRight();
            if (ground != null)
            {
                setLocation (getX() - speed, getY()) ; 
            }
        }
When I apply a similar structure to the jump command it doesnt work. This is the link to my scenario: http://www.greenfoot.org/scenarios/10009 Any advice will be appreciated :)
Gevater_Tod4711 Gevater_Tod4711

2013/11/17

#
What exactly is the problem concerning the jump command. To me everything seems to work fine. Your actor is able to jump. So what is the problem?
davemib123 davemib123

2013/11/17

#
sorted.
You need to login to post a reply.