To be clear this is a mod I am working on in blueprints for Unreal Tournament 4. The mode is payload similar to Overwatch/TF2. The reason I am posting here is that its a technical question about blueprints more than it is about UT4 functionality.
I have decided to set the payload up to dynamically adjust to the floor as it moves along it. I currently am drawing 3 sphere traces to the ground and averaging them to determine the height of the payload off of the ground.
First trace is at the front of the payload, second trace is the center of the payload and the third is the back of the payload.
So my question is, how can I make the payload rotate so that it aligns with the floor its moving over? I have the height working very well but it currently does not change pitch at all when its moving up or down a hill.
I have tried a few different things so far and have gotten a lot of really strange results. I cant quite seem to wrap my head around this one. All I need is for the payload to angle itself properly when moving up or down a slope based on the 3 sphere traces to determine the height of the floor below the payload.