+ 3
Yes But it would be better if you use some available physics engine For the understanding you will need to calculate the distance between each object on your canvas/scene and then modify their speed/direction, all this per frame basis, so it is going to be processor intense operation, which will need highly optimized code. http://www.cannonjs.org http://brm.io/matter-js/ Just to name a few, Google "js physics engine" and you will find many many more.
1st Jan 2019, 6:58 AM
đŸ‡”đŸ‡° Danish Khan đŸ‡”đŸ‡°
đŸ‡”đŸ‡° Danish Khan đŸ‡”đŸ‡° - avatar
+ 2
Not sure what you mean by "see example"
1st Jan 2019, 3:07 PM
đŸ‡”đŸ‡° Danish Khan đŸ‡”đŸ‡°
đŸ‡”đŸ‡° Danish Khan đŸ‡”đŸ‡° - avatar