Echolocation Implementation 1

In order to create the echolocation effect, I looked at other similar effects created by others. I soon realised that shaders are programmed quite differently from regular C# scripts. I looked at a few different ways of creating the echolocation effect such as changing the material of an object based on the distance to a point (tutorial here) but found that it would not work well on a throwable object as the effect would start before it had hit the environment. I also looked at another echolocation effect but found it had similar issues (here).

In the end, I decided to use a sonar effect created by (Drew Okenfuss) and adapt it to work as an echolocation effect. Though this effect is not exactly what I required, the functionality of having objects collide with the environment to create a ripple can be changed to try and create a compelling echolocation effect.

So far I have changed this shader to allow me to create a circle on the environment at the point where it detects a collision. The shader takes the velocity of the collision to determine the radius of the circle. This added functionality should make throwing ball objects more satisfying as it reacts to how hard you throw the ball.

Going forward I am working to have the ball object be throwable with the VR controllers.

First Test of Echolocation Effect:

https://www.youtube.com/watch?time_continue=5&v=42lh-wiQnAM

 

Leave a comment