Detecting slope not working

Hello kind peeps!
I am having lots of trouble with a very simple script and it’s driving me crazy.
All i’m trying to do is to have a boolean detecting if my character is in a downwards slope in order to multiply it’s speed.
I have seen multiple solutions that never work despite copying them exactly. I’ve tried Line tracing from my actor , breaking the hit result, taking the impact normal, breaking the vector to get the pitch, or using current floor, breaking the hit result of that, using the impact normal to get the pitch, i also tried using the hit actor/ actor rotation to get the pitch, didn’t work either… When checking the values in game, the problem is that the values don’t update at all (my script is on event tick), for example the pitch value will be of 0.00000, or of 66.randomnumbers depending of the solution, but none of the values of the vector will change, THEREFORE i’m pretty sure the problem is on my Hit (doesn’t hit the ground right or something?); it’s also maybe on the way i try to get the rotation of the ground.
I am lost, and can’t find any tutorials or already asked on the forum questions/answer to help me.
I would LOVE some help. Thanks :slight_smile:

Thanks for the reply! I’m not using Landscape but simple blocks. I’ll try changing the phys materials though. I don’t know how to set the debug for the trace but that will probs help me, i’m gonna look for some info on that.
Thanks for the kind help.

Hey! I finally got it, I can’t believe it how dumb the answer was, and how much hours i spent trying to solve it the hard way. I had never enabled the “collision generates hit events” in the details of the object.
Doing that made everything work as intended. Sorry for the annoyance.

If you are using Landscape, I have had some success getting the Impact Normal by setting the Default Phys Material for the Landscape object found in the World Outliner, AND/OR setting the Phys Material in the Landscape Layer Info Object, which is listed under Landscape: Paint: Layers. If you already have these set, you could turn on debug for the trace to be certain the trace is where it needs to be.