- Home /
Sinking Script
hi, i'm kind of stuck on one of my project. i would like to do a script that allows my object to sink when an object is drop on to another object using collider. does anyone have any examples that can share with me??
Answer by Justin Warner · Dec 07, 2011 at 03:21 AM
Use that to check whether it gets hit. You can reference the game object using "this" or the collider which you can convert to a game object by doing namehere.gameObject.
So if some object collides with your object, sink.
thanks that helps abit.
now i have found another bug. i have a object that is called game level and it control what type of game it is. when i turn on desert, the sinking effect will turn on. but when this turn on all my objects with mesh collider went pass the object ins$$anonymous$$d of sinking. if it is off, all my objects with mesh collider will hit the object properly. any idea?
never$$anonymous$$d i have found the error of the collision error
thanks for your help =D
Your answer
![](https://koobas.hobune.stream/wayback/20220613061844im_/https://answers.unity.com/themes/thub/images/avi.jpg)