playMaker

Author Topic: Problem with "Smooth Look at Direction" on moving platform  (Read 2611 times)

Migdocas

  • Playmaker Newbie
  • *
  • Posts: 3
Problem with "Smooth Look at Direction" on moving platform
« on: November 13, 2015, 12:15:29 PM »
Hi. This my scene:

- Moving platform with "iTween Move To"

- Character with "Get Trigger info", "Set Parent" for current Moving platform and "Trigger Event" for ground checker (on capsule feet).

All this is correct for me, but when I add "Smooth Look At Direction" my character is deformed on platform (on ground is correct)

I cant solved it. Please Help.

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Problem with "Smooth Look at Direction" on moving platform
« Reply #1 on: November 14, 2015, 07:01:26 AM »
Probably your scaled size of your platform messes up the scaling of your Character once you parenting it, maybe try to reset the scale of it while on platform? Just an idea not sure if this fix it :-)

Migdocas

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Problem with "Smooth Look at Direction" on moving platform
« Reply #2 on: November 14, 2015, 07:07:35 AM »
I tried to add a "Set Scale" 1.1.1 but reacts incorrectly , distorting the character otherwise.

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Problem with "Smooth Look at Direction" on moving platform
« Reply #3 on: November 17, 2015, 04:09:39 AM »
Does the scaling on the Character change in the Inspector while on a platform at runtime? I'm pretty sure this is related to the Platforms scaling, try it with a platform that is not scaled (1,1,1) to verify that even if it doesn't show up in the inspector.

If that's if fact the issue you should try to work with an in between unscaled helper object or make sure your platforms aren't scaled.
Else you could try to update the character's position relative to the platform every frame as a workaround (not ideal I know)

Migdocas

  • Playmaker Newbie
  • *
  • Posts: 3
Re: Problem with "Smooth Look at Direction" on moving platform
« Reply #4 on: November 17, 2015, 04:24:23 PM »
In the inspector of the character he is scaled too . If the scale platform is 1.1.1 then the character is not deformed .

Attached two screenshots to show it.

Plataforma Movil = Moving Platform
Bobby = Character

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Problem with "Smooth Look at Direction" on moving platform
« Reply #5 on: November 18, 2015, 12:43:13 PM »
Hey not sure what to read out of thouse screenshots but obviously the character  as he becomes a child of the platform gets the scaling relative to the platform of course. So to fix this you make sure your platform is always 1.1.1 by adding a "Platform node" and separate the visual object from the Logic Object.

1. So there will be an emtpy game (lets call it "Platform Node") object which does the moving etc.
2. and as a child it has attached the 3D object of the Platform and the trigger object and anything else needed.
3. you parent the player to the "Platform node" if he steps on the trigger (instead of the scaled 3D object)

this would probably fix your issues