- Home /
Climbing a Ladder in 2D Physics World
Hi!
I'm trying to make a 2D side-view maze arcade with ladders.
Now i use built-in physics engine for move a character (using self-written movement was too complicated for me with all these ray casts etc).
As far as i understand i cannot use physics to make a ladders because one collider (a hero) must fully penetrate into another (a ladder).
But i don't understand how to mix physics with triggers.
Somehow i need to detect a collision (OnCollision should't work because ladder is a trigger, OnTrigger too because a hero is a physics rigid body), then change hero to kinematic, then use transform.translate
to move up and down (or left right if there are ladders too), then when hero touch a ground or top part of the ladder (and still touching a ladder), switch it back to non kinematic, and it shouldn't fall from the top of ladder (because it's a trigger and not collidable), etc, etc...
I really stuck, please help.
Your answer
Follow this Question
Related Questions
Script calling onCollisionEnter2D and onTriggerEnter2D while disabled 1 Answer
Collider trigger only affecting a single game object when it should affect multiple 0 Answers
Detect multiple collisions with OnTriggerStay2d 2 Answers
Get information on ignored collision 1 Answer
OnTriggerEnter2D not Working 0 Answers