Jump on platform-image

jignatowskijignatowski Member, PRO Posts: 7

I want my hero to jump on a platform which is actually an image. The platform is moving along with the background and physics are set to 0 in all cases for the platform. However, when the hero jumps on the platform, the platform moves. Also, I want the hero to walk along the top of the platform but there is a gap since there is a border around both the hero and the platform.

Comments

  • TheGabfatherTheGabfather Member Posts: 633

    Do you mean that slight nudge it gets? Just Constrain the platform's Y-coordinate. Also make sure to check Fixed Rotation.

    For the gap, it might be because your character Actor's image has extra transparent spaces at the bottom side? If so, then technically both Actors are already touching/colliding with each other, it's just that visually it doesn't seem so because of that transparent area in your image.

    It would help to see a sample screenshot.

  • jignatowskijignatowski Member, PRO Posts: 7

    Thanks. The Y constrain makes sense and works. Yes, there is extra spaces so do I just need to trim/close the actors as close as possible? Or, is there a way to place an offset on their collide?

  • TheGabfatherTheGabfather Member Posts: 633
    edited April 2014

    I would suggest the former, which is trimming your images. It gets tricky centering if you're using a set of images for Animation, but it would still be better that way.

    I actually haven't used the tool in a long while, but I'm pretty sure there isn't a way yet to adjust Actors' collision borders. One way (which is slightly a bit more costly) is to make use of 2 Actors, one for your images and animations, and another for your Collision box which you can size as smaller. Constrain either's X and Y coordinates to the other.

Sign In or Register to comment.