Unity ONE WAY PLATFORM in 100 Seconds! (Platform Effector 2D)

preview_player
Показать описание
Let's learn how to create a one way platform in our unity 2d platformer game! One way platforms only have collisions in one direction, they are also called one direction platforms or one way collision platforms. This can be done by using the unity built-in platform effector 2D component.

If you get stuck, you can ask for help on our discord server! Join through this link:

GitHub Gist:

Pastebin:

2D Platformer Art Pack:

Instructions:
1. Create 2 new layers - One for the Player and one for the OneWayPlatforms
2. Place the player on the Player layer, and the platforms on the OneWayPlatform layer
3. Add a Platform Effector 2D Component to your platform
4. Disable the "Use Collider Mask"
5. Enable the "Used by Effector" on your Box Collider 2D component
6. Play around with the surface arc and the sides if necessary for your specific case
7. Write the code or download the code from the link above to toggle the collisions between the player and the platforms

If you have any questions post them in the comments and I'll do my best to answer them.

If you enjoy this type of content please consider liking and subscribing!
Рекомендации по теме
Комментарии
Автор

Nice, but the player not jump, because de layer isn't "Ground" :(

carlosalbertobatistacruz