playMaker

Author Topic: Child game object tilemap collider not following parent  (Read 3303 times)

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Hello,

I have a tilemap that has a parent that it is supposed to follow it when I rotate it. It does this when I mirror the object a couple of times (example it starts at rotation y axis 0, I flip the parent to 180, I have this parent so the child stays in place, I flip it back and the tilemap is where it is supposed to be but the collider is off to one side or another). This happens even if I modify the y values in the editor NOT during gameplay (but it does that too). Any help would be greatly appreciated. I know this may not be a playmaker issue but you guys have always been very good at responding and it might involve playmaker to solve so I thought I’d post it here.

Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Child game object tilemap collider not following parent
« Reply #1 on: May 17, 2024, 08:24:04 PM »
I forgot to mention that enabling and disabling the tilemap collider (whether at runtime or in editor, not gameplay) fixes this issue but enabling behavior causes an error. Would late update be affecting this (I’m not sure how it is currently set).

Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Child game object tilemap collider not following parent
« Reply #2 on: May 18, 2024, 02:52:04 PM »
I also noticed that reseting the tilemap collider in the inspector on/off seems to be the issue. How do I reset a component? I don't see an action for this, even in the ecosystem browser. Is this a cache issue (thought I saw that from a website somewhere). Would reseting the cache help? If so, how do you do that at runtime? I don't want to use set property because I want to standardize the process (copy and paste fsm on multiple game objects) and enabling behavior gives me an error like I said earlier.

Thanks!

misterjuly

  • Sr. Member
  • ****
  • Posts: 357
Re: Child game object tilemap collider not following parent
« Reply #3 on: May 18, 2024, 07:26:45 PM »
I SOLVED IT!!! I had to destroy and create the collider component then activate composite collider component, but then I would fall through the terrain, so for a couple frames I had to freeze the player in place. Whoo...

I realize destroying objects can result in a lot of junk, but we will cross that bridge when we get there, unless you have any other suggestions...