I tried parenting a small cube with the mesh renderer switched off that was checked as a trigger, but when I did, the lift animation wasn’t triggered.
So I had a block called ‘lift’ and another block which was a trigger.
In the Js code I had:
GameObject.Find(“Lift”).animation.Play(“LiftUp”);
I wasn’t sure whether that meant I needed to tag the lift block or trigger block with a tag called ‘Lift’.
I’ve tried so many combinations. I’d rather the code be in C#. I’m a real newb, and I’m just trying to get results in the 6-8 hours I have to work it out.
But I will definitely keep trying when I have free time again.
It’s hard to guess the details of your collision from only the scene views, so maybe more details would help.
One thing you should know is that marking a Collider as “Trigger” will have it ignore collisions with the world environment. So I take it your elevator is a “Trigger” and probably won’t collide with anything.
If that’s the case, I’d suggest ticking off the “Trigger” checkbox on the Elevator collider and adding another collider on top of the Elevator that activates the activation when you enter that one instead
Give that a shot, if you need more explanation, more details or if you have further questions or details for us, fire away, otherwise, please accept this answer
For the elevator, you can have two different colliders : 1 trigger and 1 not triggered. As ThePersister said, triggered ignore physics collisions.
An other way is to create an other gameObject with a trigger, at the same location than the elevator.
The advantage is that when you go back to the elevator, it won’t move up again and again.