overte-org / overte

Overte open source virtual worlds platform.
https://overte.org/
Other
132 stars 48 forks source link

Parented entities do not scale with parent using the create gizmo. #801

Open Basinsky opened 5 months ago

Basinsky commented 5 months ago

If you scale a parent entity with the create gizmo, the child entities will not scale with it.

AleziaKurdis commented 5 months ago

This raises a few interrogation: If you want to resize the entity that is the parent, it might be even more annoying to have to unparent the root (in a large ensemble for example) to do this.

We have selection function to "add the children to the selection". Maybe we can say that people need to add them to the selection and just do the resize based on a multiple entity selection (See issue #792)

Also to consider if someone jump into this:

HifiExperiments commented 4 months ago

the biggest reason that we don't have this is that we don't currently support shear transformations. for example, if the child is rotated at all, scaling the parent in the x axis would actually scale the child along a diagonal axis (unless you expect it to also just scale in x...but I believe that would be unexpected too). that's not currently possible from the engine side.

if we could support that, and assuming it's from the c++ side, maybe with a new property like scalesChildren and/or scalesWithParent, most of the things Alezia listed shouldn't be huge deals and should be handled automatically by the engine, except automatically scaling the lineHeight which would be cool (maybe need a text specific scaleLineHeightWithHeight (???) property)

AleziaKurdis commented 4 months ago

(maybe need a text specific scaleLineHeightWithHeight (???) property)

Hmm. this seems still tricky. What it will do? if you have "this is a text" and you have it on 1 line (let's say it is very wide in X) then you resize the Y to be 1 m...then the line height will fit that. then you resize the X to see only "this is" (with 1m lineHeight) is it going to automatically split in 2 lines with half the lineHeight it previously have ? How it could figure the number of lines ?

It could be also only at the editor level... like only the "global resize" + if an option "proportional line height" is checked. Probably not very intuitive. What about editor "global resize" always resizing lineHeight proportionally? Could we live with that?

HifiExperiments commented 4 months ago

since this is a new behavior for text entities, I think we'd want to control it separately (since it's not really a child entity).

I think all of this scaling behavior should be engine-side, not create side. on the engine side, we do know how many lines the text entity will fit in - although I don't think the line height scaling should automatically split lines, but that should be a separate property (https://github.com/overte-org/overte/issues/583)

AleziaKurdis commented 4 months ago

Yeah.. forget what I say about the multiple line.. it won't do that since it needs a \n to have a break line. So it would work.