So I have a building system built entirely with blueprints, this system allows player to place, move and delete objects selected from a menu. I recently started adding multi-selection and the operations that come with it, I got scaling and rotating working but somehow I can’t figure out how to deal with location. For rotation I use a simple function to rotate a vector using the rotation delta my gizmo gives, but I can’t figure out a function or a mathematical answer to applying a location to multiple actors.
Basically what I would need is to get the last object in my selection array and all the other actors need to follow the delta that this object uses, I tried using add local/world offset but it uses the delta on a per object basis, which makes my objects move all on their own local spaces.
Unfortunately attaching and detaching breaks the whole system for reasons I cannot change, the plugin I use for the gizmo gets confused with attached object that’s why I was asking for a solution without that…
Yes I can, it’s when I use local that it gives the delta on a per object basis, basically I would need the selected object to “become” the world center for all the other selected objects and apply the delta based on this, or as I said apply the delta based on the local space of the last selected object, would the “transform location” work for this, I’ve seen it in the math library but I’m not sure of its usage
Yes, moving object B (and all the others) along object A, so when object A receives +10 on the X axis I need to convert that for every object so that they have + something on the required axis based on the rotation of object A and their own rotation, technically using object A’s local axis as the world axis for every other object, if that makes sense, I’m sure there’s some simple or complex maths to calculate the distance and all but I’m no math genius…
Here, the vector is the delta given by the gizmo, it’s always +10 on the X Y or Z axis or combinations of those like XY XZ YZ(grid-based basically but it shouldn’t matter)
This can be done with transform location, too but I would not use transform direction as then you’d need get tick involved which may result in an inaccuracy. You may end up adding varying amount of offset. Perhaps it’s negligible.