#OnTriggerEnter Ladder
1 messages · Page 1 of 1 (latest)
,
There's a whole bunch wrong with your code. It doesnt recognise that private, which means earlier you forgot to end a function with }, or did something else the C# compiler doesnt understand.
There's a . missing between other and gameObject, you want to get the gameObject property of other, and the syntax for that is other.gameObject.
gameObject is a p[roperty?
Or a field, i dont know which one unity decided to make it.
I guess i should have called it a variable.
no
the script is inside a private void FixedUpdate(), and this one is, obviously, inside a public class CharacterController2D : MonoBehaviour
{
If you want you can post a bit more code.
But in general, you should have your methods separate. So you have one FixedUpdate method, and then a OnTriggerEnter.