Physics Debug Extension
Website: RotaryHeart.com
Product Wiki: Online
Version 2.0.0
Available Now: Asset Store
Release Notes
Physics Debug Extension is a system that allows to preview any Physics cast, checks or overlaps. It can easily be used without much code modification.
A code that normally uses:
Physics.SphereCast(bottom, top, transform.forward, out hit, 10)
Will only need to be changed to
RotaryHeart.Lib.PhysicsExtension.Physics.SphereCast(bottom, top, transform.forward, out hit, 10, RotaryHeart.Lib.PhysicsExtension.Physics.PreviewCondition.Editor)
Note that the last parameter will indicate if the lines should be previewed at editor, game or not drawn at all.
It even have 2 extra parameters to change the hit and no hit color, which are optional. Here’s a quick preview of how it looks:
Here you can see a Sphere cast from the camera, a line cast from the character face and 3 box cast (object left, right, up direction)
It even shows the collision point like this:
After a couple of requests for in game preview I was able to implement it using Unity GL. So now you can see all the lines on a game too.
If none is passed as preview parameter then it will work the same way as the Unity physics cast since all the drawing is by passed. Currently all the Unity casts, checks and overlaps are implemented.
Currently tested systems:
Windows
Android
Mac
Linux
iOS






