Entities resize when re-parenting in editor -- how do I get them to stop?

Hi! I’m coming from Unity, where gameObjects don’t change size, rotation, or scale when they’re moved around in the hierarchy – their local transform changes relative to their new parent. In PlayCanvas, I’m finding it very frustrating to move an entity to a different parent and have it suddenly disappear or move across the screen or scale to 8 times its size. Does anyone know if there’s a setting that will change this? I tried hitting the globe-shaped “World/Local” toggle on the side, but it didn’t change this behavior. All of my Google searches so far have pulled up stuff like proposed/closed changes on Github from 2015, nothing exactly relevant.

Thanks in advance to anyone who can help! I rely on parenting and relative scale in the hierarchy quite a lot, and it would be very time-consuming to have to painstakingly rescale everything every time I move it around.

Hold Ctrl when reparenting (more hotkeys here) https://developer.playcanvas.com/en/user-manual/designer/keyboard-shortcuts/

(This could be/should surfaced better :thinking:)

Edit: I take that back. It doesn’t seem to handle scale. Only position and rotation :frowning:

Created feature request here: https://github.com/playcanvas/editor/issues/150

What I normally do to workaround this is to have the model component on a child entity with a parent that always stays at (1, 1, 1). This allows me to reparent more easily and at runtime, I know that I have a normalised size of 1 that I can scale for effects etc.

1 Like

First of all, thanks so much for responding so quickly! And thanks for creating the feature request.

I’m glad there’s already a good solution in place for rotation and position. For scale, having a parent at (1, 1, 1) will probably help for now. I do a lot of simple ‘rigging’ with parenting, though, and I don’t always keep every model at their original size, so I do feel that this limits my flexibility. I also haven’t figured out yet how to resize a model (in the .fbx or .json file settings) rather than an entity – like in Unity, I can set the scale factor in the import settings, but I haven’t found a comparable setting in PlayCanvas.

I’ve only been using PlayCanvas for a few days, so a little awkwardness in the transition is to be expected. Other than these few things, I’m delighted with it so far! I love Unity, but its poor handling of WebGL content (especially for mobile) has been its biggest flaw for me. It’s great to add a web-prioritizing game engine to my toolset.

1 Like

Unfortunately, that’s another feature we don’t have. You would have to resize it outside of PlayCanvas and/or use the parent/child pattern mentioned above.

As it sounds like you will be working with a lot of models, we don’t yet have the feature that imports all the model’s graphnodes into the scene in the Editor. We have some work around this coming but not anytime soon.

There’s going to be some pain the transition if you will be doing a lot of customisation or manipulation of an import model I’m afraid.

Totally fine, none of these are dealbreakers. It’s not the end of the world if I have to do some things manually. Thanks again for your quick responses!

1 Like