The suggestion of @Leonidas makes me a bit doubtful whether I understand the problem correctly, but I think the same problem is discussed in the topic below, so maybe it can help you.
https://forum.playcanvas.com/t/solved-making-first-person-character-walk-through-stairs/