Relative speed

I get confused.
Why ben renamed the Elevate(DegreesPerSecond) to Elevate(RelativeSpeed)
When I searched about Relative Speed I found this definition “We can define relative speed as the speed of a moving body with respect to another.” But what we actually do is get the difference between Barrel.pitch and player.pitch as rotation not speed. then inside elevate function we clamp it between -1 and +1 to just know the direction the barrel must take (Up or Down).

so how does this make sense?
I know why we clamp the value but I don’t understand why we call it RelativeSpeed?
it’s a little Q in my head.

Thanks in advance.

It’s a confusing name, yes. It would be more appropriate to call it a fraction/percentage.

It is a value between 0 and 1 that will act as a percentage of how much of the max speed should be applied that frame. So most of the time it’s either 1 or 0 but as it gets closer to the target location it will be value between 0 and 1 as it would only need to move a fraction of the max speed that frame e.g. 0.5.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms