I need to make an object (simple sphere) scale along a non-cardinal direction. This is not the same as simply scaling along a combination of directions.
For example, scaling along a vector half way between the x and y axis vs. scaling equally in the X and Y direction.
In the above image, the top figure would be the source object, the left figure is what I want to achieve (scale along a custom direction) and the right figure is what i get if I scale along the x and y directions individually.
i don’t get the problem here, why not just rotate that sphere however you want to, and then scale like that, scale takes the local object space directions of the object not the world space.
The issue is that the scaling must be dynamic (based on the velocity and direction of a player controlled pawn) and the object must remain fixed in space and rotation.
This is necessary to represent a special physics effect called a Lorentz contraction
you could try making a vertex shader with worldPositionOffset, and a custom shader node, where you multiply matrix transformations in HLSL. you would need to rotate the mesh, scale it along a world axis, then rotate it back… but im not sure how to scale things along a world axis in UE4.
I’m coming to this thread a bit late, but I am trying to achieve the same thing. The link you shared no longer works. Can anyone provide some more information on how worldPositionOffset can be used to create the Lorentz contraction effect? Any help would be much appreciated.