Recalculate a Vector3 with an UpVector?

I’m trying to make a custom gravity system and I wanna damp the character’s velocity by a Vector3, but of course I know I would need to utilize the current gravity direction somewhere to make it damp the velocity correctly.

What I’m looking for is a formula that takes the damp force Vector3 and “translate” it to the current gravity direction.

So if the gravity direction was (1, 0, 0), it would output (1, 0.75, 0.75), (0, -1, 0) would be (0.75, -1, 0.75) and (0, 1, 0) would be (0.75, 1, 0.75).

Any help is appreciated!!!

is this what you’re trying to do?

local damp = Vector3.one * .75
local gravity = -Vector3.xAxis

print(gravity + (damp - gravity:Abs()):Max(Vector3.zero)) -- -1, 0.75, 0.75

Technically yes, but I wanna be able to change the Y axis of the damp Vector3.

you mean being able to make gravity (-1, 0, 0) damp (.75, .75, .75) result in (-1, .85, .75)?

No, I wanna be able to change the Y axis of the damp variable. I wanna set it to (0.75, 1, 0.75)

oh yeah then just change the gravity variable, i might’ve misunderstood the original post. Changing the gravity variable to something like Vector3.zAxis will make it (0.75, 0.75, 1) or Vector3.yAxis for (0.75, 1, 0.75)