GML path_rotate focal point?

Zodaris

Member
When using path_rotate and path_orientation, what is the focal point they rotate around? Point 0? [0, 0] in relation to the path? A "center of mass" of sorts between all the points? In the case of path_orientation does it rotate around the object currently following the path?

I don't use paths often so I haven't experimented with this yet, and Google failed me. The manual also says nothing about this whatsoever. I can figure this out through experimentation (and probably might by the time this thread is answered) but figured I may as well try to save some time along with making sure future people with this question can easily find the answer here. (And on that note, I'm specifically wondering about path_rotate for my uses. Figured path_orientation was related enough that I should get answers for that too in this thread.)
 

chamaeleon

Member
I have not used the function myself, but the first sentence says it is rotating around the center, which I will take as the average of all the x/y positions making up the path (sum all x values, divide by number of points, sum all y values, divide by number of points).
 

Zodaris

Member
*face desk*
Somehow I missed that after reading through it like 10 times looking for exactly that. Thanks a bunch for pointing that out! I feel silly now for making this thread but oh well.
 

Zodaris

Member
Ah, thanks for confirming that! Just got started coding expecting it to be the center so I'm glad I saw your responses before I got too deep into it.
 
Top