V
V
Viktor Ivanov2019-02-03 15:36:59
Algorithms
Viktor Ivanov, 2019-02-03 15:36:59

How to implement the effect of "splitting" of an object upon collision?

Hello! I want to implement the effect as in this video: https://youtu.be/pX2ZZjPpfkY?t=94
As you can see, the circle breaks up into smaller circles when it collides with the wall. Please provide some information on this subject. And even better, how to correctly compose a search query in Russian and English?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Developer, 2019-02-03
@Openmen

Maybe particles.
But, it seems to me that the easiest way at the moment of collision is to replace the circle with a set of smaller ones, give them an initial expansion speed in random directions, and with each iteration, multiply the speed by a factor less than 1, by analogy with the friction force, for example, by 0.95. when the particle speed is below the threshold, stop

A
Artem Spiridonov, 2019-02-04
@customtema

Universal solution. Two objects, one solid, one broken, with "physical", physical or IPO breaking animation. At the moment of breaking for 1 FPS, you replace one object with another and start the animation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question