Download

Odd behavior: HISMs (somtimes) scale across the surface they are distributed across?

I have a script that takes a static-mesh (a floor-tile), gets the dimensions, adds in a buffer and does the proper math to distribute those in an grid across a cube-static-mesh (my floor) as instances for a HISM.

I can successfully apply a randomized transformation to each instance. Rotation, scaling, or translation even to the point where I can ensure the defined translations fit within the defined buffer (to prevent ugly overlaps). This all works great! Especially the rotation, small values for X/Y can really jaggy/ancient-ify a floor as if the level-earth has been unsettled over time and the z-axis rotation helps to create a sense of wear-tear. All modifications work across scale, rotation (all axes) and translation.

However, if I scale the scene-root (click the cube in the editor, it picks the entire BP and I use the transform handles to make the cube-static-mesh bigger) all the rotated 90 degrees left/right HISM instances are scaled in the same manner and NOT the ones rotated 0/180… EG: if I make the Y-scaling 5x, then only some are scaled on the Y-axis (not all!). This makes 0-sense since the HISMs are children and I can imagine ALL the meshes being scaled in the Y-axis, but it’s ONLY when I add in additional, orthogonal rotation that this happens at all…

LOL, dude, wtf?? Can anyone help explain this?

To explain the rough logic:

  • I get the sizes of the things involved, adding into account buffers, and specified translations
  • X/Y steps across the cube-static-mesh where I run line traces and at the point of impact place a mesh flat along the surface
    -only logical-path difference ought to be a boolean (Add_Orthogonal_Rotation) which on true gets an int from 0-3, multiplies by 90, turns that into a z-axis rotation, and then combines that with the already working z-axis rotation (swizzle value the user can define the min/max rotation, per-axis) that feeds into both true/false paths…

So the swizzle-step for min/max works (tested) and when I want to add in 0,90,180, or 270 to mix up the static meshes, it does that odd thing to the scaling, but only 1/2 of them…

Tried to work around this issue going after the floor-static-mesh directly and I can get it’s bounds, it seems to always be the original size, unscaled and I can’t get the scale of the cube-mesh directly… Am I on the wrong path here, missing something??

Pics: Floor-tiling-tool. - Album on Imgur