A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Parking Game collisions problem

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    1

    Parking Game collisions problem

    Hello all!

    We have made a flash game, parking type, that uses the collision detection kit (http://code.google.com/p/collisiondetectionkit/) and it works ok.

    When the car hits another object, it should stop moving, but when it detects the collision, if we configure it to stop moving, it doesn't move at all because it is still colliding with the other object.... So, we figured a solution to make it bump a bit on the opposite direction, so that it gets away a bit from the obstacle.

    The problem is that even with the solution we made, when the car is on a tight spot, it bumps on the first object and then with the -speed it has, it overlaps the next object and goes away off stage! :-S
    I think the ideal would be not to bump, but how?...

    Any ideas welcome...

    Thanks

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    2
    I like puzzle games......

  3. #3
    Member
    Join Date
    Jul 2012
    Posts
    39

    Post

    Well just make it not move only if it is moving. This can be done with a simple if statement... Example:

    Code:
    if (moving)
    {
        if (collision())
        {
            stopIt();
        }
    }
    Last edited by Gogafem; 08-02-2012 at 07:30 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center