Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Question 2D help

Discussion in '2D' started by AJ2Swag, May 18, 2024.

  1. AJ2Swag

    AJ2Swag

    Joined:
    May 15, 2024
    Posts:
    1
    I'm making a platformer on unity2D and need a way to anchor a platform in place, (Keep it in the air and not have the player knock it over if they hit the side of it) can someone help me :)
     
  2. dstears

    dstears

    Joined:
    Sep 6, 2021
    Posts:
    219
    If your platform has no RigidBody2D, then it cannot be moved around by physics and won't move when the player touches it.
    If your platform needs a RigidBody2D for some reason, then you can set the Body Type to "Static" and it will not move.
    upload_2024-5-18_12-3-35.png
     
    DrDemencio and AJ2Swag like this.
  3. DrDemencio

    DrDemencio

    Joined:
    Sep 2, 2022
    Posts:
    83
    Also, if it needs to move but must not react to collisions, you can use the Kinematic Body type