I’m shooting a ray under the player to detect the floors normal.
This is used to add trimping, but once the player walks of a ramp, the normal is reset, so the trimping function doesn’t do anything.
Is there a way to save the last normal before going midair?
Then I can use that instead of the ray’s get_normal()
I’m thinking I can shorten the ray, and somehow keep it from going to (0,0,0) when it isnt colliding
I don’t know what trimping is, but what’s stopping you from just updating a var conditionally based on the current players state? Just an If statement or two should do the job surely.
Trimping is basically how cars drive off ramps, but when I use a raycast to find the normal of the floor to add a boost to simulate trimping, it resets to (0,1,0) or the floors normal. I kinda want something like: if the floor normal is equal to vector3.UP, set a variable to the last angled normal.
Or it just doesn’t update when the floor is vector3.UP but I tried that, and it worked but it never reset to (0,1,0) which is what I want when I’m on the floor.
The entire reason I’m using a ray cast instead of the get normal function is so I have it while I’m midair.