I am making a training game to demonstrate effects of terrain on radio waves. I have animations emitted from radio towers out to a maximum radius. Students will place the towers on 3D terrain. When the animation (indicating area of coverage) hits a ridge, I would like it to stop expanding and start over again from the beginning. In other words, if a tower is near a ridge, only the first 20% of the animation might loop repeatedly, but farther away more or even all of the animation would loop.
At first, I assumed the ridge terrain would block the animation, and indeed the part of the animation on the ridge is hidden by the terrain, but then it continues on the other side of the ridge. I then created enormous invisible (mesh renderer off) rigidbody “ridges” on the ridge lines with the tag “Ridge” and believe I am successfully testing for that tag OnCollision via debug statements. The animation has “Animate Physics” checked, and the Ridges are kinematic. But I’ve not been able to make the animation end and restart up first collision with a ridge. I’ve tried both Rewind and Start but I’m not sure my formatting is correct.
Any suggestions or sample code for something like this?