- Home /
[2D Platformer] How Do Make My Character Walk Through A Platform
I Have added a platform effector to a platoform and it works all fine but how do i make my character not interact with the sides of the box collider basically how do i make my character through the platform
So, a one-way collider for the platform, huh? Wher you ccan stand on top, but also walk through it from the side and jump onto it from under it? Depends on the CharacterController your use. You usually have multiple raycasts in all directions, and only the ones downward are set to register such a platform collider.
Answer by Masterio · May 04, 2016 at 07:38 AM
You have 3 ways for this task:
As Cherno said: With ray casts.
You can use 2 colliders: 1 for platform and second for activator for the paltform collider. Place the activator under the platform, if character touch it with his head then activate platform collider.
Platform script: you can write a script for activating a platform collider if player position is above the platform, of course you must add some position offset.
Your answer
Follow this Question
Related Questions
Disable player in certain scenes? 1 Answer
Flip the player with arm rotation 2 Answers
How would i calculate the size of a 2D area closed off by multiple colliders? 1 Answer
2D Sidescroller Issues Please help. 1 Answer
Jump Function C# hassle! 0 Answers