Point in hypotenuse direction

id: 749774

category: Help with Scripts

posts: 3

italvera italvera loading
Is there any way you can setup a script to find the direction to make a right triangle? (Like if I made a length of 10 and a height of 7 it would find a direction to match that and make a perfect right triangle)
Here's the project if you need it
Malicondi Malicondi loading
This will just require using some trigonometry, if you're trying to point in direction of the hypotenuse, you can use this block:
point in direction ([atan v] of ((x) / (y)))
which finds the direction of the hypotenuse, (x is the adjacent, or the side on the floor, y is the opposite, or the side going up, in your case it would be b / a) if this isn't what you're looking for could you describe what you're trying to do a little more?
italvera italvera loading

Malicondi wrote:

This will just require using some trigonometry, if you're trying to point in direction of the hypotenuse, you can use this block:
point in direction ([atan v] of ((x) / (y)))
which finds the direction of the hypotenuse, (x is the adjacent, or the side on the floor, y is the opposite, or the side going up, in your case it would be b / a) if this isn't what you're looking for could you describe what you're trying to do a little more?
I tried this, but it didn't work. In the meantime, I will unshare the project until I can find a solution.