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

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    You need to go into it's physics and uncheck "Movable"
  • decaoeudecaoeu PRO Posts: 61
    But i need the platform to by movable.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    It shouldn't matter. Use interpolate.
  • jckmcgrawjckmcgraw Member Posts: 647
    @decaoeu, scratch my idea. @Braydon_SFX way is much more efficient. I forgot you could interpolate an actors position when it's "not movable".

    Jack
Sign In or Register to comment.