I’m using the standard asset First Person Controller. I set up some water and made the water a cube and made that collider a trigger. I want to make it so when the character falls down into the water there is no gravity so he can start swimming. But when I use
`void OnTriggerEnter(Collider other)
{
other.attachedRigidbody.useGravity = false;
}
`nothing happens, the gravity doesn’t stop but if i do just
OnTriggerEnter(Collider other)
{
Destroy(GameObject);
}
then when the character hits the water it works and he gets deleted. So I don’t know why the gravity wont turn off in the first example. The only thing I can think of is all the scripts on the First Person Controller are in Java, and my scrips are in C#. Are java and C# compatible together in unity?