Forum rules - please read before posting.

Object with 'Follow Sorting Map' component will shift position if placed in AC folder directory

edited May 2018 in Technical Q&A
Only happens if they are placed under one of the AC empty game objects, such as '_SetGeometry".
Maybe I am not using this component as intended, but I find it great using the component for scene objects the player walks around.
I mean it's a lot simpler just using the objects' anchor points to determine whether the player is in front of or behind, rather than having a lot of sorting layers and sorting map areas.

Comments

  • edited May 2018
    The FollowSortingMap component is indeed meant for characters, rather than stationary objects - and it's position is changed according to its parent position when accounting for other objects in the same "Sorting Area".

    When used as intended, this is basically used to correct the display order of two characters that occupy the same area.  Since both sprites'll have the same Sorting Order, they're sprite positions are offset ever-so-slightly in the Z-axis to correct the drawing order.

    Though attaching the component to scene objects isn't strictly "correct", I appreciate that it's easier for you in this situation barring this.  I'll look into improving the algorithm when used in this way, or at least make it optional - thanks for posting.
  • edited May 2018
    Thank you for your response. Could there be potential problems with doing my scene objects this way? They seem to work fine unparented. 

    After my initial post I realised that although it's easier in terms of player position, it can be more fiddly than your recommended way when there are multiple objects in close proximity to one another with varying pivot points. For example a character siting on a seat and behind a table. 
  • The re-positioning you mentioned is actually a bug, that will be fixed in the upcoming update.

    It's not the planned use of it, so it's hard to say if it'll cause problems - but if it works, it works I suppose.

    The amount by which such components are offset is determined by the Shared Layer Separation Distance field on the GameEngine's Scene Settings component.  The new update will also allow the effect to be removed completely if set to zero.
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.