Bad Collision Calculation

I'm having an issue in a new game I'm working on that relies heavily on collision. Unfortunately, I have found that the GameSalad engine doesn't seem to reproduce the same results every time.

For example, if you have a ball spawn repeatedly in the exact same spot and have it bounce off of multiple other objects, the bounce pattern will not be the same every time. And, the more objects in bounces off of, the less accurate it becomes.

Does anyone know a way around this? Maybe by simulating collisions with velocity changes instead of the built in collision?

Comments

  • zweg25zweg25 Member Posts: 738
    You can make an exact path for the ball by putting a rule in the ball that says:
    If actor receives event overlaps or collides with object 1 move to whatever position x and y and when overlaps or collides with object 2 move to whatever position x and y.

    If it is colliding with the same actor just in different spots (i.e. object 1 is in 3 spots) you can make an integer attribute in the ball and call it collide number. Then make a rule in the ball that says if actor receives event overlaps or collides with object 1 and self.collideNumber == 0, move to whatever position x and y and change attribute self.collideNumber to self.collideNumber+1, and if actor receives event overlaps or collides with object 1 and self.collideNumber == 1, move to whatever position x and y change attribute self.collideNumber to self.collideNumber+1 and so on for however many collisions there are.

    Hope that helps
  • dmilinovichiiidmilinovichiii Member Posts: 620
    Well say the objects that the ball bounces off of are at different angles each time. How could you make this work for any situation?
  • dmilinovichiiidmilinovichiii Member Posts: 620
    I tried having the objects set their angle to a game attribute when they detect the collision and using this for calculation, but unfortunately, this causes inaccuracies to occur.
Sign In or Register to comment.