Collisions and bouncing...
I have a brick breaker type game that I'm making.
I have a rule on the balls that If Ball collides/overlaps with actor: Side Wall;
Change attribute self.linear velocity.X to -self.linear velocity.X
(this gives it a true bounce from which the ball was coming from).
I have the collide behavior on the side wall.
Sometimes (actually, much more often then I'd like) the ball "hic-ups" on the wall. Like it tries to bounce off but doesn't completely and takes a fraction of a second to bounce off correctly.
1. Does it matter where the collide behavior is at? Should it be on the ball instead? Should it be on the ball AS WELL?
Anyone else ever had this problem and what'd you do to fix it?
I have a rule on the balls that If Ball collides/overlaps with actor: Side Wall;
Change attribute self.linear velocity.X to -self.linear velocity.X
(this gives it a true bounce from which the ball was coming from).
I have the collide behavior on the side wall.
Sometimes (actually, much more often then I'd like) the ball "hic-ups" on the wall. Like it tries to bounce off but doesn't completely and takes a fraction of a second to bounce off correctly.
1. Does it matter where the collide behavior is at? Should it be on the ball instead? Should it be on the ball AS WELL?
Anyone else ever had this problem and what'd you do to fix it?
Comments
The density of the walls are 5000.
:-)
I'll try collide behaviors on both actors. Do you know how much processing power is required for collide behaviors? I'm really needing to cut some serious stuff if I want this game to be playable.
try raising it to like 50000 on the walls
and raise the ball to like 100 if u can
about putting collide on both - im guessing thats to do with how often it checks all the rules and it being more likely that it will come across the rule during that time period if its on both actors... anyone know what the time period is - 0.05 or 0.01? or less?