Moddingear
(Moddingear)
November 13, 2016, 9:04pm
1
This title is because the problem that I’m facing is quite hard to explain.
Basically, I have an angle Theta, which is known, and a distance T that I want.
The distance m is the one that I’m trying to get
So, when Theta would be equal to 0, m = T
Theta can go up to 90°, and at 90° it would theoretically be m infinite.
A simple lerp doesn’t work, and I don’t know how I can achieve this with maths.
So T is known aswell?
The solution is:
sin(Theta) = T / m
<=> m = T / sin(Theta)
Though I don’t get why you think m=T for Theta -> 0 or m -> inf for Theta -> 90°. It’s the opposite in my opinion.
Moddingear
(Moddingear)
November 13, 2016, 9:29pm
3
Yes, T is known, the only unknown is m, and sin(theta) = T/m returns 0 when Theta = 0.
All I want is T to always be T, and get m with the angle, so the only thing I need is m.
m=T for Theta = 0 because that’s what I want it to do actually, instead of being 0 :
I have a face, and i’m creating another face that I want to be T away from it in a certain direction, so that’s the way I see it.
Yes, sin(Theta) = 0 for Theta = 0 but m is not.
Moddingear
(Moddingear)
November 14, 2016, 5:47pm
5
Solution found ! Just had to make it so that Vector2 is always included in Vector1, since they can be translated in vectors.