Hi everyone. I’m making a setup scene where the player has to build their base before the game starts (i.e. Rampart). I created prefabs for the different walls and want to detect when a collision takes place between two pieces, then raise the collider piece above the other. I figured I could do this by simply:
function OnCollisionEnter(col:Collider){
if(col.gameObject.tag == "piece"){
col.transform.position.y = theHeightOfTheObjectCollidedWith + .1;
}
But how do I find the height of theHeightOfTheObjectCollidedWith?
BTW I wrote this on my Blackberry so excuse any typos.