lördag 4 mars 2017

Fracture Success!

We got the pane to shatter based on where we hit it:



The implementation works by having a non-cracked and a cracked pane switch out when the non-cracked pane's trigger collider registers a hit from the projectile. Each shard in the cracked pane has a trigger box collider which will check for a projectile, and when it finds one it will use a "OverlapSphere" to find all shards around it using the projectiles position, and then apply a rigidbody, remove the box-collider, and apply a mesh-collider.

This is a pretty crude and un-optimized implementation though, and we will work on making it work and look better from now on.

Inga kommentarer:

Skicka en kommentar