Learn how to create Unity 2D falling platforms in just 60 seconds for your unity 2d platformer game!
If you get stuck, you can ask for help on our discord server! Join through this link:
/ discord
FallingPlatform.cs
https://pastebin.com/id5vYuB3
2D Platformer Art Pack + MORE FREE STUFF EVERY MONTH:
https://bit.ly/free-game-dev-assets
Instructions:
1) Make sure your player has the "Player" tag assigned
2) Attach the Rigidbody2D component to it
3) Set the Body Type to Kinematic - this will stop the platform from falling
4) Set Intrpolation to Interpolate
5) Attach the Platform Effector 2D component - it will stop the platform from hitting other platforms
6) Disable collider mask (optional)
7) Make sure "One way" is ticked to true
8) On the box collider of the falling platform, set Used By Effector to true
9) Attach the FallingPlatform.cs script to it, play with the values to your liking and attach the Rigidbody2D reference
10) Feel free to create a prefab of your falling platform so that you can create as many as you like and all the new changes will propagate to the copies
11) Press play and enjoy!