Moving obstacle

AtlantenAtlanten Member, PRO Posts: 56
edited November -1 in Working with GS (Mac)
Hey, I was wondering:

How do I make a moving obstacle that is not affected by stuff colliding with it? You know, I just want the thing to have its own animation no matter what crashes into it.

Even if I set the density to a billion and the player's to 0.1, it will still pick up some force and start gliding off in the wrong direction.

And I don't want to unclick moveable, because then it won't move at all.

Any advice? Thanks!

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    yes, similar to what tshirt said..

    make 2 attributes in the Actor: originalY and originalX

    Change Attribute
    self.originalX = self.PositionX

    Change Attribute
    self.originalY = self.PositionY

    Constrain Attribute
    self. PositionX = self. originalX

    Constrain Attribute
    self. PositionY = self. originalY

    That will allow to have, say, a spinning propeller in the scene that knock around other Actors.
  • AtlantenAtlanten Member, PRO Posts: 56
    Sure, but constraining X and Y is not what I want to do... since I want it to move. And I don't want to fix rotation... since I want it to be able to spin. A spinning propeller would start spinning the other way of something came crashing into it.

    Constraining velocity works to a certain extent. But it gets a bit static

    I guess what I am looking for is a way to have something move + rotate, but not be affected by gravity or collision?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    It doesn't work perfectly, but you can play with Actor's density. set the uncollidable one to 100000.
Sign In or Register to comment.