I’ve been trying to mirror a spline, but what I’ve found is that the Construction Script doesn’t seem able to override spline points placed directly in the world. Can anyone confirm or deny this?
I’ve even tried add and removing spline points, and nothing happens.
Again, to be clear, the spline is edited in the Editor view, not the Blueprint.
Well not sure by you mean by that, but you can put that in world and adjust the spline on actor and would work, but I understand that there could be some limitations depending on what you need.
Oookay, so the first picture is the blueprint, and the video shows how I add points directly into the world, however, adding points are instanced, so when you look in the blueprint, nothing changes:
No worries, I understand the issue now. It seems to be about persistency between the instance and the actual class.
What you want is for changes made in the world to be reflected in the blueprint class.
This is possible, but it’s worth mentioning that any change to the BaseClass propagates to all instances in the world. You probably know this already, but it’s important to keep in mind.
So if you propagate instance changes back to the BaseClass, other instances will also be affected (especially if they rely on construction).
What you need to do is, when you create or modify spline points, write that data to the BaseClassCurrentSplinePoints, then clear and regenerate the spline.
You can also add a function (for example in construction or as a callable editor function) so this doesn’t run all the time, but only when triggered manually, like an “Apply Changes To BaseClass” button that executes the update, so you see changes in your base class.
It does, and me no want to do that because I’ve already used this class HUNDREDS of times. I’m in too deep man!
For now, I will directly change the scale to get the desired effect.
Yes, this is a no-no, but I only need locations, not rotations (enemies always face the player, so they’re not using the spline’s rotation), and setting X to -1 does this.
Thanks for the confirmation that this is not directly possible!
I hear you, but I have a lot of AI that is coded specifically to these spline classes… and I don’t want to touch ANYTHING.
I’ll use my workaround, but I mainly wanted to make sure what I wanted to do (Construction Script → Instanced Points) was not directly possible. And it’s not. I appreciate the clarity.