1

I have struck a problem with a little app that I am programming in Max MSP. I have a randomly generated maze with 4 balls, these balls pathfind to each other. The problem I am having is I cannot think of a way to make them follow the path more efficiently, at the moment they essentially seem drunk / stupid. This problem arises because I am using the physics engine in Max MSP, the way I control the balls is to give them an impulse (instantaneous force). Please see this short example video.

https://www.youtube.com/watch?v=Z-DlGt8e-Hw

I am trying to figure out a way to get them to anticipate corners and to slow down, but can not think of the best approach. Any further reading would be greatly appreciated.

Rampartisan
  • 427
  • 6
  • 19
  • Whee! A fun question! Not a full answer here, just a suggestion: You are trying to apply acceleration to achieve the desired X. Consider calculating a desired velocity based on the desired X, and then applying acceleration based on your desired velocity... – Andy Newman Jul 14 '15 at 14:50
  • Thanks for the suggestion! Going along with that line of though, I am thinking of creating an array of target velocities for each point on the path (happens to be each square of the maze). Then a bit of code can compare the actual velocity of the ball vs its target and apply an impulse accordingly. – Rampartisan Jul 14 '15 at 15:43

0 Answers0