How to scale an actor to match another actors bounds
Hi, I'm new to UE4 and am hoping someone can help me get past this blocker.
In my example I have an actor in the foreground - it could be a chair. In the background there would have a plane that lines up perfectly with the bounds of the chair. This would update on tick, so that if the chair were to rotate, then the plane would rescale accordingly.
I am thinking that you would need to draw an imaginary box around the chair to get the boundary coordinates, and then combine with the distance of the plane from the chair to scale accordingly. If this is the right way to go about it I have no idea.
Images attached should demonstrate the intention clearly - white area is the plane, black is the rest of the scene.
Addendum: I am more interested in recreating this effect, than trying to force the specific solution I gave above - e.g. UMG/post-processing/etc are all valid routes.
For anyone trying to achieve the same outcome - I managed to get the result above, but through a totally different method.
I ended up removing the plane entirely and using a LineTracer to sweep inside the sphere radius of the target mesh - once from each direction - until a collision was detected. This value was then projected to screen space and passed to a UMG border blueprint that altered its size. My thoughts were that by using a 2D, screenspace solution it wouldn't be tripped up by pivot locations, scale, rotating, transformations, etc.
It works very well and with any mesh.
Follow this question
Once you sign in you will be able to subscribe for any updates here