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

2012/5/4

Collision detection with an Object

kartikitrak kartikitrak

2012/5/4

#
I know how to get collision detection with one side of an object however I was just wondering what is the code to get collision detection for a whole object. For example: Mario is running and he see's a pipe(he can't go in it). I don't want him to go through any sides of the pipe. I think you use "getIntersectingObjects", but I don't know how to implement it.
  public boolean hittingPipe()
    {
        //Collision detection
    }
The collision detection code would be in a method which I would when Mario is running.
kartikitrak kartikitrak

2012/5/4

#
Never mind. I got it.
You need to login to post a reply.