Having trouble with some conflicting code. They both work fine separately, but not together. This issue is that When an event is called, I want an object to move in the x and y, then back again. However I also want it to bob up and down on the z continuously, regardless of the x/y axis. I tried spitting the structs, and only setting the z location for the bobbing, but then when playing it shoots the object off in the x/y axis
In the second graph, your line trace is in line from the (0,0,0) to your character location in that direction. Not sure that’s what you want.
As for the bobbing, your bob distance calculation is a scalar value. IOW, it’s a single value, not a vector. When you add it to your RelativeLocation, it’s going to convert your scalar to a vector. Said plainly, it will duplicate your value to the X,Y and Z values of the vector before adding it. So the culprit is your addition node.
You need to create a (0, 0, BobZ) vector.
Use the make vector node and connect it to the addition node. Connect the output of your last multiplication to the Z value of make vector.