spacegrubs / primus

0 stars 0 forks source link

Expand a sphere collider from player center #18

Closed emanisgrand closed 5 years ago

emanisgrand commented 5 years ago

Is your feature request related to a problem? Please describe. No. I want to expand a sphere collider out from the center of the player character.

Describe the solution you'd like Have the sphere collider expand outward from the player character. It would act as a trigger and when it collides with "enemy" objects, they shrink. It should only last for a little less than a second.

Describe alternatives you've considered Sphere collider has a radius that is a float. Scaling the transform.x also has the same effect as expanding the radius.

Additional context This will lead into my first AI behavior script that I want to write.

emanisgrand commented 5 years ago

overlap sphere https://docs.unity3d.com/ScriptReference/Physics.OverlapSphere.html

emanisgrand commented 5 years ago

took me like 2 or 3 hours but I got this step done... expanding

NEXT STEP: make the collider disappear after it expands while still allowing it to be recalled when 'X' is pressed.