- Home /
Collision Problem with Rigidbody?
Hello, I am making a capture the flag sort of game and I attached a script to my flag that is supposed to switch a boolean in my player's script to "true". However, it only works when the flag's rigidbody is set to "Uses gravity", but when "uses gravity" is turned on, the flag flies around all over the place! Does anyone know how this problem can be fixed? All that's supposed to happen is that my player runs into the flag's box collider (which works fine), then switches a boolean to true which prints out a gui text. When I turn off uses gravity this part doesn't work but if gravity is on and I run around and manage to hit the flag, it does work. Thanks a lot!
Answer by electricsauce · Sep 16, 2012 at 04:34 AM
You could try adding a cube where your flag is and use isTrigger to change your boolean.
If i use isTrigger, the flag dissapears for some reason...
use isTrigger on the cube that you added, not the flag