I’m a student and this is the first year I’m learning how to program. In this specific level I have a character that can move on x and y axis on the first floor, but then when he enters each door he is supposed to move either only on x OR y axis. Each door also has triggers I used to do the teleport thing.
I tried to do this but with OnTriggerEnter but then it would only work when he was inside the trigger.
Any tips?
Assuming you’re using a Rigidbody component, there is a Constraints part where you can restrict what axis physics can affect the object in. You should be able to toggle these from code. Hope this helps.