Collide without breaking

decaoeudecaoeu PRO Posts: 61
edited June 2012 in Working with GS (Mac)
I have a movable platform in an scene without gravity. The platform goes right to left and return, and i have actor who falls of the sky and hit the platform, the problem is that when he does that the platform breaks and goes down with him, is there a way to fix that, and make the platform hold the position when it collides with the actor.

Best Answer

  • jckmcgrawjckmcgraw Posts: 647
    Accepted Answer
    Create a real attribute in the moving platform called "startY".

    Put in a change attribute: startY to self.pos.y.

    Then put in a constrain attribute: self.pos.y to startY.

    Go into self.physics.FixedRotation and set it to true.

    Now, your platform will be able to move freely along the x axis, but the y axis is constrained, as well as the rotation.

    Hope this helps,
    Jack McGraw

Answers

Sign In or Register to comment.