Search Unity

Character & Moving Platform Issues

Discussion in 'Scripting' started by maltadirk, Feb 17, 2015.

  1. maltadirk

    maltadirk

    Joined:
    Mar 12, 2014
    Posts:
    43
    hi all,
    I'm working on a 2d platformer. The issue I'm having is with moving platforms and sliding slopes.
    When the player gets on a moving platform and the platform starts moving, the player does not stay on the platform and slides off. To fix this I created a simple script that puts the player as child of the platform when it triggers the player is on the platform, however this doesn't allow the momentum generated by the platform to be used once the player jumps. This is more visible when the player is on a slippery slope platform. I would like that when the player is sliding down and presses the jump button to not only gain vertical movement but also gain momentum on the horizontal axis.

    Thanks,
    Dirk