-
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
-
I like puzzle games......
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|