- Home /
How to make collision visible in final game?
I want to add a feature to my game that allows the player to enable visibility of collision boxes, very similar to the practice mode in Skull Girls: https://youtu.be/QWmMd6ZDzBs?t=20
(I've been trying to figure it out on my own, but having trouble.)
I found a few other answers on visible collision, but most of then were for editor only, and other methods just didn't seem to work for me at all. I don't know why.
(On another note, I have some complex polygon colliders, so I'd rather not have to resort to just spawning sprites that I manually set to the same shapes. I need a performance efficient method. My guess is I need to use the same vertex information as the colliders, so I won't be making any unnecessary recalculations.)
(Note: I'm already familiar with setting up options screens, and toggling features on and off, so I don't need anyone to show me that part. : )
Thanks in advance!
Answer by bgprocks · Sep 17, 2018 at 06:24 PM
I can think of a few ways to do it. You can create boxes that overlaps your colliders that you can turn their meshes off/on for training. Then your colliders can all subscribe to the same event. OnCollision with any of your colliders, you just raise/fire the event (ie. OnCollision Flash(color)).
Your answer
Follow this Question
Related Questions
How to make work a collision when is invisible? 3 Answers
Player Collision with objects (help) 3 Answers
why camera does not recognize the collision? 1 Answer
Collider collision processing speed 2 Answers