- Home /
Overriding another OnCollisionStay
Hello there, I've got problem or maybe I have no idea how to do it right and clean. I would like to create a main terrain (lava) and the platform in the middle. While you are on lava it will affect players so I use OnCollisionStay event and while on the platform you are ok but I don't know how to override the main terrain OnCollisionStay. While testing both OnCollisionStay are combined and while on platform I don't want to get affect from the lava OnCollisionStay. I would also like platform to shrink overtime and I've read that terrain cannot be resized runtime? Is it correct? Should I use Terrain for lava and Plane for platform? Thanks for any help :)
Edit: I'm also using Nav Mesh Agent to move my player, I tried to change the terrain and plane position.y to have like (0.01f) difference but then player.position.y is changing when close to the edges of the plane that's why I get two OnCollisionStay results but I don't know how to do it the better way. Please help...