Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

Mirroring messes up Sine behavior angles of hierarchy children #8245

Open Alaadel opened 2 weeks ago

Alaadel commented 2 weeks ago

Problem description

Mirroring an object causes Sine behavior to be messed up in all hierarchy children.

Attach a .c3p

test mirror.zip

Steps to reproduce

  1. Click "Mirror"

Observed result

Sine behavior angle is messed up.

Expected result

Sine behavior angle updates relative to the new angle.

Alaadel commented 2 weeks ago

Update: there is a workaround but it involves multiple steps:

  1. loop over the Sine parts (steps 2-4)
  2. set cycle position to 0
  3. update sine initial state
  4. disable Sine
  5. after the loop, mirror the object
  6. loop over the same parts and enable sine

This workaround requires the sprites to have the same angle as the instances, which is not necessarily the case in all situations. There is a potential fix, which is to offset the angle of the instance, but the implementation I found doesn't work in all cases.

If C3 can have an option that can help with this process, that would be nice.

AshleyScirra commented 2 weeks ago

Minimal repro: issue8245.zip