Forum rules - please read before posting.

FollowSortingMap (when live preview unchecked, don't scale to Vector3.one automatically)

Hi Chris,

I have been working with this character object in a third party cutscene editor and I turned off "live preview" in the FollowSortingMap component. However, when I was trying to make changes in editor with regards to the scale of the character (as I am working my cutscenes in a very manual way) my edits kept getting overriden to (1,1,1).

I had a look at the FollowSortingMap script, and noticed that when the "live preview" checkbox is unticked, the character automatically gets locked at Vector3.one.

Just a suggestion to change the behaviour of the FollowSortingMap script for a character so that when the live preview checkbox is unticked, the character should not automatically scale to any value at all (currently Vector3.one (1,1,1)).
Or at the very least put in another checkbox "lock scale at 1,1,1" that performs that function.
But don't think it should be by default.

I've currently just commented out that line, but I obviously don't like editing core as it will get overwritten with updates.

Comments

  • edited September 2017
    If you're using a Sorting Map, the sprite's scale is going to be overwritten anyway - regardless of whether or not you're previewing it in the Editor.

    Could you elaborate on your "manual way" of working?  I feel like I'm being told the solution without knowing the full question.
  • Sorry, let me try and explain better. I am using a 3rd party cutscene tool called Slate. I want Slate to be able to use the characters, move them around, rescale them, run animations etc. when in cutscene play mode.

    One of the great things about Slate is that you can scrub through the timeline in edit mode, get a live preview of all of the various bits and pieces you are changing, and also add keyframes that records those positions/booleans/values etc.... in a similar way to the built-in Unity Animator/Animation tools. The only issue is, that FollowSortingMap script keeps over-riding my character's scale value so I can never actually preview those keyframes in the Slate timeline (or save those keyframe values as it copies the values from the GameObject in the scene).

    With regards to the FollowSortingMap overwriting the scale in runtime, I basically lock off AC systems and disable (make 'enabled' false) on the followsortingmap script on the character(s) I want to manipulate just before the cutscene starts playing. And then re-enable them all again upon cutscene completion.
  • edited September 2017
    I'm aware of Slate, I agree it's a great tool.

    I would like a bit more clarity, though.  Are you animating the "AC" characters (i.e. the root objects), or just their children?  I'm trying to understand why - if AC previews the correct scale anyway - you're looking to override the scales at all, unless the characters need to appear at different sizes to how they would in normal gameplay.

    The resetting to unit scale is done because a sprite child should be this in it's default state.  If it were possible to only reset it at the point that the "Live preview" option is unchecked, would that be a reasonable compromise?
  • I am animating the "AC" characters / root objects, not the sprite child.

    Even in gameplay, in some cases, I have multiple sorting maps and the character doesn't necessarily follow the default sorting map in a particular part of the scene. For instance, in one scene, on the right hand side the sorting map is different because of the perspective of the scene. I could keep swapping out those sorting maps for the live preview functionality, but it would be a lot easier to just edit those scale values manually.

    I think that only auto resetting the scale when the checkbox is unchecked (once) would be a great compromise and would be greatly appreciated.
    Thanks for your help and apologies if I came across a bit abrupt in the initial post.
  • Don't worry, it didn't - I just need to know to know the scenario in full when considering such changes.  I'll see if the compromise can be implemented.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.