if the variable Pippo increases gradually increases the variable Pluto

I have two variables: one calculates an angle, the other is a fixed value.
I would like that when the angle increases the other variable also increases gradually.
how can I do?
thanks

6741043--776845--upload_2021-1-19_19-3-0.png
6741043--776845--upload_2021-1-19_19-3-0.png
6741043--776845--upload_2021-1-19_19-3-0.png

All the images you uploaded are broken. Use code tags to post code.

There’s a bunch of ways to do what you want to do. The simplest is just a statement in your Update method that sets value A based on value B. For example, `A = Mathf.Sin(B);’ If that’s not a viable option for you, please explain the situation in more detail.

the images Ido not know what they are I have not uploaded them and anyway they are not needed. while my player walks he detects the slope of the ground. then the second variable is the distance from the ground. if the plane is more inclined by n degrees then the ground check does not work and therefore I would like to increase the distToGround as the angle increases.

also in this post, there are those images but I don’t know.

so cause another problem I can’t walk on stairs because the angle of the plane under the stairs is too high

6741043--776845--upload_2021-1-19_19-3-0.png

I’m not sure what you’re pasting into your posts to get them to be treated as images. Anyway…

You still haven’t shown any code, so I’m only guessing here. But how do you know the angle of the plane if your ground check doesn’t go far enough to hit what’s under you? You’re kind of saying that for steep slopes, you want to test a further distance for the ground. But you won’t know the slope of the ground unless you hit it in the first place…

Anyway, you may simply be running into issues because your ground test is using a Raycast. I can’t tell, because you haven’t posted code. You can instead use a spherecast to avoid the kind of issue you’re running into.