Skip to content

This is a lib created for Unity that can handle a method for create a ground destruction in some sprite ground using polygon collider.

Notifications You must be signed in to change notification settings

feerposser/ground-impact-destruction-2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Made with Unity

Ground Impact Destruction 2D

A lib for creating destruction in a 2D ground using squares and parallelepipeds.

image

How it works

Recreate the polygon collider of an object based on impacts.

How it does this

The lib implements a class that uses a linked list to track all the impacts positions in the object. Every time that the object receive an impact, this position is set to a ordened place inside the linked list.

After doing this, the class create an array of vectors that can be used by the polygon collider to recreate the polygon format of the object.

When it works

For now, the lib can handle with square and parallelepiped ground formats. Also, just create square and parallelepiped destruction in the ground. Besides that, the lib can't handle with increasing of the "holes" in the object. Can you contribute with this project? Send a PR (:

Flow

image

Next steps

  • be able to get the pivot position of the impact created
  • be able to increase the size of some hole when a impact is detected on the area of a previus impact

Can you contribute?

About

This is a lib created for Unity that can handle a method for create a ground destruction in some sprite ground using polygon collider.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages