Hello, I’m currently building a little spline tool to help me place large crop fields in the environment with some useful controls for my purposes. Gist of it is, I have a spline, I move the points in XY and they snap to a fixed height on Z relative to the ground, and crops get spawned within the spline according to values I set for Crop Spacing, and Row Spacing. Here’s quick video to illustrate the idea probably better than words:
The key aspects here - in construction script, I get the bounds of the actor containing the spline, and then use that information to generate a single line of X-axis transforms for the instances, like so:
I then use that first line and the bounds Y extent, to add and subtract along Y for each existing instance, to generate all the rest of the transform locations, like this:
I then line trace to put all those transforms at terrain level, and then check if each transform is within the bounds of the spline curve. If it is, I add an instance to the HISM.
This works pretty well as you can see in the video, except for the fact that it’s all happening in world space and only functions properly if the spline actor has no rotation.
However I want to be able to define the rotation of the crop field. I’m having a very hard time figuring out where and how in the above sequence I need to adjust the transforms in order to get this to work as it does in the video, but with the ability to either rotate the spline actor itself, or define a rotation float variable, or basically some method to get the same behaviour but the entire thing being able to rotate so I can angle the field relative to roads and other scene objects easily.
If you need any more information in order to help I’m happy to provide it. Would love to figure this out and I’m sure someone who’s better than me with this stuff will have the right idea for me to go down… hopefully ![]()