Hello, I have a small vector math problem here.
My goal is for a character to slide downhill, but the velocity should be redirected so that we always go in direction of the camera (or the actors forward vector).
For the sliding, I have just disabled friction in the character movement component, and I add a constant fake gravity, seen here:
This results in successfully sliding down hills.
I thought that adding the Forward Vector would do the trick but it doesnt seem to do anything. If I multiply the forward vector then it sort of puts me towards the right direction, however tiny values result in flying off the map. If I use lower values it does not make enough of a difference to really give me any steering.
I think what I need to do is say something like this:
Always go in the direction of Forward Vector, but multiply it by how fast you are going.
I could try getting the ground slope and using that to adjust the velocity, but then you have no momentum at all - as soon as ground slope pitch is lower, you immediately change velocity.
So that’s why I have this idea that velocity should just be left to the physics to be decided, and I only should make sure to redirect it in direction of the camera/ actors forward vector.
I hope that makes sense. I’ve been trying to get this system working for several days, any help is appreciated.