MrUnit64 / TransformAnarchy

Rotates objects freely in Parkitect
MIT License
4 stars 2 forks source link

Size hotkeys stop working when TA gizmo is active #22

Closed MrUnit64 closed 8 months ago

MrUnit64 commented 1 year ago

As the title says, changing object size using hotkeys is not possible when the gizmo is enabled. Changing size using the slider in the deco menu does work when the gizmo is enabled.

Distantz commented 1 year ago

I think this is due to the Builder update being skipped while the gizmo is active. We can add support back quite easily by taking the code from builder and including it in our "beforebuilderupdate" method

MrUnit64 commented 1 year ago

Looks like the code for resizing objects is not that complex ingame, but since it has to sync with the value in the deco menu it becomes a bit more complex. Also I have no idea how to access the gameobject that's being build to apply the resizing code to. My understanding of Harmony just doesn't go that far.

Distantz commented 1 year ago

It's known as the "ghost" gameobject, and is accessible with harmony. it should also be already passed to the build patch.

MrUnit64 commented 12 months ago

The size of the object is not only tied to the ghost but a separate BuildableObject called builtObjectGO. I have to reference that object as well to retrieve and update the object size, but can't figure out how yet.

MrUnit64 commented 8 months ago

Fixed with latest dev build