playMaker

Author Topic: Player getting stuck in flipping object  (Read 230 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 339
Player getting stuck in flipping object
« on: April 27, 2024, 08:50:41 PM »
Hello,

I have an object you can flip (essentially mirroring it). The game object is a 2d tile map that is essentially a stair case. If I flip this stair case while my player is on it, my character will get stuck within it, even if a polygon collider is on the tile map. A couple of potential solutions I thought of (though none of them are ideal), is to have a reset button to reset the puzzle or to not allow the player to flip the tile map game object while in a spot that would get him stuck in the tile map. If anyone can think of a more elegant solution, it would be greatly appreciated. Thanks!

mintyman

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Player getting stuck in flipping object
« Reply #1 on: April 28, 2024, 03:11:27 PM »
I dont have much experience in 2D game games, but I would try to parent the game object to the stairs on collision. when the game object flips the player should flip with it if parented. to un parent just "on collision exit" un parent the player. try that and let me know if it works.

misterjuly

  • Sr. Member
  • ****
  • Posts: 339
Re: Player getting stuck in flipping object
« Reply #2 on: April 28, 2024, 07:41:01 PM »
I could try that, but I feel it would limit certain puzzle potential (it is a little hard to explain, but for example, if you have an L shaped tilemap and you a spike is in the center, you might have to jump, move, then flip the L tilemap in that order, whereas your solution makes the puzzle much easier with a simple flip; I hope that makes sense). If you or anyone else has any other ideas, it would be greatly appreciated!

Thanks! :)

misterjuly

  • Sr. Member
  • ****
  • Posts: 339
Re: Player getting stuck in flipping object
« Reply #3 on: May 02, 2024, 09:38:33 PM »
bump