I have a system I created quite some time ago with actors moving along splines, that get dynamically created. Everything works fine, but now revisting this again for a rework. Here I’m coming across an old issue I had at the time of making that system.
Problem: the moving actors have a spline component. If storing the spline data (points etc…) within that component itself, I had weird movement issues (actors flying away in kind of a spiral movement). While all waypoints were reported correctly when debugging, the movement was wrong. Must somehow be related to the spline being a child component of the actor it is controlling…
The only way I did get around that was to store the spline contents themselves in a separate “spline manager” actor placed in the level - and in the moving actors just reference the spline content stored in that actor. This was not a problem, because I needed some manager anyway.
Now having that manager actor with a Map of splines, key is name of the moving actor - I would like to get rid of that, because my feeling is, that this design is bad. I’d prefer to have a solution not requiring that separate storage and instead keep everything self contained within my moving actor class.
Any ideas, what I might have done wrong?