Actor collides with another actor then passes through it

ArmellineArmelline Member, PRO Posts: 5,376
edited January 2012 in Working with GS (Mac)
Hi,

I am trying to set up a simple behaviour where a wall moves across the scene and when it reaches the player's actor it collides with it and pushes it. I have the moving wall as a non-movable object moving using interpolation and the actor moveable by the player. When the wall reaches the player's actor, it pushes it slightly then passes through it. If the player's actor is actively moved into the wall, it gets pushed along as intended. When the player's actor is moved to the wall is cannot pass through it.

Any idea why the collision is not sticking? Thanks in advance for any help!

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited January 2012
    Hi Castle, possibly because the Interpolate behavior isn't interruptable sometimes...

    Perhaps try using velocity to x or y limits, and a rule that when the wall collides with the player, set velocity to 0. This is off the top of my head and might not work, but it's in the right ballpark, I'm thinking...

    ----------------------------------------------
    http://davidgriffinapps.co.uk/

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • ArmellineArmelline Member, PRO Posts: 5,376
    Thanks for the response gyroscope. It's definitely something I'll have a play around with!

    Before coming back to the thread though, I tried playing with various settings. I'll have to test it lots more to be sure it is actually doing what I want, but it seems that making the wall movable with fixed rotation has stopped the strange "passing through" behaviour. I don't really understand, but it *seems* to be producing the result I want.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Good one, Castle. :-) Glad it's working for you now. I'll do a test to include that to get it into my head.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Before you switched movable, did you have a collide with behavior in either the wall or the actor? An overlap and collide rule doesn't make actors physical interact with each other for that you need a collide behavior. But yes if you are moving the wall it should be checked movable and the fixed rotation will keep it from moving on it axis when it collides with another actor.
Sign In or Register to comment.