Oh boy
So the blueprint has grown a bit... This was how it looked like at the end of week 2
It only goes forward and if you rotate the actor it will twirl around objects. Pretty cool. Most of the time I spent figuring out the logic of how to control the spline, but once I got that down everything else came smoothly. So the progress for each next step was rapid and I was quickly getting lost in my own blueprint even after trying to keep it tidy.
To summarize these are all the current functions:
Sine Equation offset
I used a sine equation with decreasing frequency and amplitude over the length of the spline. I had some trouble first transferring the equation into blueprint and then the user wouldn't be able to rotate the spline as it will naturally gravitate to a weird angle. I then realized I just had to convert it to the spline's forward and up vector. It can be customized by the user to how they see fit.
Willingness to Twirl / Climb
These are flat offsets applied to each point with a worldspace up multiplier to make it climb, and a right and up vector offset to make it twirl around objects. These work against each other but if the user gets the right value you can get it to climb while spinning around objects.
Randomness + seeds
I implemented randomness quite early into the project but it was just pure randomness. I had to learn the difference between seeds and streams in unreal to make the randomness seed based. It's quite weird to set it up and I'm still confused as to why a stream is needed to generate a seed.
Allow climbing on ceilings A simple tickbox to dictate whether the Ivy should fall off edges or should it cling to the surface and carry on underneath.
After Falling Spaghetti After a falling sequence hits the ground I was debating what to do. For a time I just told it to finish the spline but that's not how it works in real life. If I just let it continue after hitting the floor it'll continue in a straight unrealistic line, this was until I was playing around with my sine equation and found that certain values will create interesting seemingly
random growing patterns. So I just used them to trigger after hitting the floor.
Attractors / Influencers
The artists always wanted more control so the idea for an attractor came about. I quickly managed to implement one after realizing it's local space which felt weird adding it onto worldspace offsets but it did the job. The next day I was requested to make it so the artist can add multiple attractors... This was actually my first time dealing with arrays. This took me quite a while to figure out as the logic required to make sure each point knew which attractor it's supposed to be heading to was very finicky. It would be easy to implement it at the end of the blueprint once the spline has been created because then I would be able to get the spline length and manipulate based on that, but that's not an option in my case as I have to calculate all of this point by point while the spline is being created.
If you set curliness to max and use some attractors you'll get some really cool results as if the spline was alive.
Comments