
u/Outrageous-Law3460

How to do a basic line trace along a slope.
Each line trace has a vector, which is normal set to [0,0,-1]. However, this doesn't work on slopes. So you calculate the normal vector of it, split that up into its x, y, and z components, multiply them all by -1, and those are what you plug into your line trace! (For example, a 45 degree wall would have a total component of [0.707,0,0.707]. So you take the, multiply it by -1, and use that in your line trace as [-0.707,0,-0.707]) And make sure to have gravity apply in a completely different part of the script from the line trace, otherwise the game will think walking on walls is normal.
How to do a basic line trace along a slope.
Each line trace has a vector, which is normal set to [0,0,-1]. However, this doesn't work on slopes. So you calculate the normal vector of it, split that up into its x, y, and z components, multiply them all by -1, and those are what you plug into your line trace! (For example, a 45 degree wall would have a total component of [0.707,0,0.707]. So you take the, multiply it by -1, and use that in your line trace as [-0.707,0,-0.707]) And make sure to have gravity apply in a completely different part of the script from the line trace, otherwise the game will think walking on walls is normal.
how rare is this to happen?
is there any chance that this just happens in terrain generation? It is literally an underwater chest not in water, and with three of the underwater chest main items.