[SOLVED]Bullet Behavior Bounce HELP!

Get help using Construct 2

Post » Tue Jan 19, 2016 7:19 pm

Hello, I'm experiencing a bug that I just cant seem to squash.

While using the Bullet Behavior on a 16x16 Ball Sprite, (Speed = 200 // Gravity = 10 // Bounce off Solids = No // Set Angle = No),
The ball will occasionally get stuck bouncing back and forth Vertically or Horizontally forever.
For instance , || O -----------||----O---------||--------O-------||----------O--||------------O||

In the events, I'm using, "Ball is overlapping Collider?" > Bounce Bullet off Collider. How can I adjust this so that it will never get stuck using the Bullet behavior?

Any help is greatly appreciated, this is basically the last game breaking bug in my game!
Last edited by Wolph on Tue Jan 19, 2016 7:42 pm, edited 1 time in total.
B
8
Posts: 28
Reputation: 756

Post » Tue Jan 19, 2016 7:31 pm

You can make the angle of motion change randomly a bit right after a bounce.

Ball: is overlappin collider
--- ball: bounce off collider
--- ball: set angleOfMotion to ball.bullet.angleOfMotion+random(-5,5)

If that's too much use a value smaller than 5.
B
91
S
31
G
99
Posts: 5,196
Reputation: 65,678

Post » Tue Jan 19, 2016 7:41 pm

...Incredible response time, that fixed it completely. You sir, are my god. Thank you so much!!
B
8
Posts: 28
Reputation: 756


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests