- Home /
Getting events to happen inside of collisionboxes.
Hi I am making my first game in unity and have made relatively good progress but there is one problem, in my code seen below i have scripted it so that if the gameobject is hit in this case being a box that is going to be used as a collision box, the detaildensity of the terrain goes down to zero. My question is can i make this localized inside of the collisionbounds of the box so that it does not remove all of the detail from the terrain, but instead only removes the details in the collisionbounds of the box?
function OnCollisionEnter(collision : Collision) {
Terrain.activeTerrain.detailObjectDensity = 0.0;
};
Any help is appreciated and if I have not been clear ask and I will clarify :)
Your answer
Follow this Question
Related Questions
Can't set Bounce Threshold below .3 0 Answers
Tree collisions do not work 2 Answers
Problem with collisions: Player and Terrain 0 Answers
Fading Between 2 Materials? 1 Answer
Make a simple tree 1 Answer