#i think this is math

1 messages · Page 1 of 1 (latest)

crimson saffron
#

if i get a line from the origin to the target, how do i get the rotation from the start that faces towards the target?

median pier
crimson saffron
#

im trying to make a type of line

#

then

#

i want the rotation of the line from the origin

#

as if the origin was rotated to the target

#

anyways i gtg

#

be back in a few hours

tame glen
#

you use math.atan2(Y, X)

median pier
tame glen
#

lol ig that works, sounds janky but kinda smart

median pier
tame glen
#

I've never seen that in the programming world

agile wolf
#

cframe.lookat depending on exactly what you're trying to do

tame glen
#

yeah if you only have the positions

agile wolf
median pier
#

I mean, it would also return the correct angle, yet I wonder how he got the original angle in the first case without… well, having said angle

tame glen
#

oh wait I know why subtracting is bad, its cause it tells you how much it is rotated relative to the other rather than the actual heading in the world

crimson saffron
#

Hi I'm back for a lil

#

I just read the thread

#

Just wanna clarify some questions

#

I don't need to make the line, just an example, I'm trying to go from 2 positions that is already known, and i wanna get the direction of it, like how if i look at a window that's the way I'm facing, i wanna see if i can get that info from just 2 positions

#

Also

#

When I'm back

#

Again

crimson saffron
crimson saffron
#

im back on pc