- Home /
When adding a box collider boat starts moving?
I'm making a boat game, but now when i add a box collider so my bullets can hit him, the boat starts moving! i've just ajusted the size of the box with the size of the boat! can anyone tell me what is the problem?
Answer by whydoidoit · Jul 08, 2012 at 10:29 AM
Presuming you have a rigidbody set to isKinematic = false then the collider you have added is acting as part of the structure of the boat. I suggest you set the new collider to isTrigger=true and use the trigger functions to detect the bullet collision.
thats a great idea but i dnt know how to work with that i know i have to make a physic material right? can u explain more or less how to use that?
So make your collider isTrigger = true and then write a function for the bullet to hit the boat:
function OnTriggerEnter(other : Collider) {
//Check other.gameObject.tag for your bullet here
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613073852im_/https://answers.unity.com/themes/thub/images/avi.jpg)