Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Landing on a rotating platform

Discussion in '2D' started by Lidanh, May 1, 2015.

  1. Lidanh

    Lidanh

    Joined:
    Mar 27, 2013
    Posts:
    29
    Hi there,

    I have a rotating platform (using Hinge Joint 2D) and I want my player to land on it and stick to it after landing. When needed, the player will need to leave the platform and I want it to use the current platform speed. (move towards wherever the platform is)

    Things I have tried:
    1. When colliding, become the platform child and then keep moving with it (stick to it).
    The only problem is that when I leave the platform I won't be accelerated by the platform's speed. (If I leave the platform I will simply fall down)

    2. When colliding, I tried to add a new Hinge Joint 2D to the player and put the middle of the platform in the Anchor. The only problem is that I couldn't calculate what to put in the "Connected Anchor"...

    Please let me know if you have any ideas.

    Thanks,
    Lidan
     

    Attached Files:

  2. Lidanh

    Lidanh

    Joined:
    Mar 27, 2013
    Posts:
    29
    Onward and upwards
     
  3. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Did you figure it out?
    I was going to ask - isn't there an inherit velocity code thing? :confused:
    Artist here. ;)