Forum rules - please read before posting.

sort map and scaling in 1.40 vs 1.38c

so.

I've updated to a clean checkout of 1.38c before the upgrade.

I have one NPC - Smokey. 
He has two follow sort map components. on the parent object and on the sprite obejct.

the sprite child object was scaled to 0.4. 
when the follow script was working, it affected the child scripts in 1.38c.
in 1.40 it affetcs the parent.

if i remove the scale, he becomes huge in the scene  because the follow sortmap component doesn't work when you're not running the game.
but at least he's the right size now, like in 1.38c.

the other thing that confused me was that something went wrong in my sorting map (characters aren't in the right scale) in two of my scenes and i don't know why. it is the same way in the clean check out as well :/
that might have been my fault. i'll try and fix this manually.

this is 1.38, with the fixed sort map and the 0.4 scale on the child. (when the game runs it affects the child sprite gameobject):


image

image

Comments

  • this is in 1.40:

    i removed the 0.4 scale from the sprite child. and now it seems to be ok. (and the scale is applied to the parent)
    But he's huge when the game isn't running

    image

    image
  • edited November 2014

    When the game isn't running, he should be his regular prefab size. Don't try to scale him manually - leave it all to the SortingMap to handle.

    Older versions of AC would scale the sprite child of the character, whereas the current versions now scale the parent object - that's likely the cause of your problems. Keep your base object at a unit scale, and only have one FollowSortingMap component per-character. You don't want your Sprite Child to be scaling too.  Placing one FollowSortingMap on your Sprite Child ought to do it - look to the Brain2D player prefab that the 2D Demo uses for reference.

  • right. well, not everything is scaled on 1. 
    is there a way to apply the sort map on the scene editor not during runtime , so i can see if my positioning and sort map is correct? 

    as you can see Smokey is huge when the game isn't ran. it would also be easier to set sorting map not during runtime and then having to copy parameters over when game mode had stopped.
  • I'll see if it's possible, but that's just the way it is for now.  Don't forget you can just copy the whole component - no need to paste in individual values.
  • Thanks, and yeah. that's what i do. but in the sort map , for example, there's two things to copy. the transform and then then various levels... so that's mroe than one copy-patse.
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.