The idea is that for each ball that hits the glass a point is stored with the same position from the ball collision. If another ball hits the glass within a minimum range, they will be connected. As more and more points are connected they will eventually form a full circle (of connected dots). What will happen then is that everything that is inside this circle will fall.
We did a similar implementation, but it's not as optimal as the original idea. What this implementation does is similar by the fact that it stores points, but for every point a center point is calculated. From this center point a OverlapSphere is called which makes everything in the center fall down. This solution works in some cases but in other cases the glass will still be in the air, or at least parts of the glass.
Here is the glass simulation before and after the implementation of this new feature.
The balls represent the collision points. Green balls are collision points and the red ball the the relative center.
We are working on an improved version of this implementation which we hope will be finished before the final project day.



Inga kommentarer:
Skicka en kommentar