-
-
Señor Member
I'm guessing you're somehow using velocity variables?
If so, set them both opposite of what they were (ex: vx = -vx)
and the car will rebound backwards at exactly the same speed. Sometimes this gives a problem where the car stays in the wall after the collision and vibrates around... so first take back your last movement by subtracting
car._x -= vx
car._y -= vy
and then change the velocities to negative.
You could also thinking about adding some spin, or changing the directions by a little bit (use math.random() to make the car not travel backwards at exactly the same angle as it came in at) to make it seem more realistic.
Good luck
Mavrisa
Haikus are easy
But sometimes they don't make sense
Refrigerator
-
RE: [F8] Realisic Car Game
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
|