Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Colliding Mice behavior coding
I am trying to code of how the mice will behave based on the following algorithm.
1.) A mouse will move at a straight line in a random direction.
2.) If it collides with another mouse, it will move in another direction.
I am new to qt so I'm having a hard time on how to code this.
Any coding help is very much appreciated. Thank you!
Hi and welcome to devnet,
Are you looking for the Colliding Mice example ?
@SGaist Hello! I've already found the Colliding Mice example. I'm just trying to figure out how to code the algorithm to the mice.
It's all done in the Mouse class in the advance function
@SGaist Any chance you could help me code the algorithm?
What do you mean ?