Hi everyone,
I know this question has been asked many times already, but most of them occurred long ago or didn’t have an answer that would help.
For context, our project is on Unity 2019.4.28f1. We are using the Terrain tool to place trees on a map. I am trying to use the OnTriggerEnter/Exit for audio purposes. It works if I use the prefab directly in the world, but not as a painted tree.
Here’s what I’ve read and done so far:
- Use trigger and collider w/ rigidbody
- Made sure Layers are set up properly for collision (works as a prefab anyway, just not painted)
- Made sure Tree collision is enabled on Terrain
- Moved the terrain object to 0,0,0 (it is slightly off origin, but moving it to 0,0,0 didn’t fix it)
- Refresh the trees in the Terrain tool
- Use Capsule Colliders on tree
Is there any other things I might have missed that would explain why everything works when trees are used as prefabs, but not when painted?
Thanks everyone !