Rotational matrix transformation
Yeh look i've got a point, and it's got an offset for both X, and Y. From These offsets we have a rotation(float) and we need to calculate the new center.
My code is absolute garbage and i've got things close, but they're not close enough for pathfinder, and i'd like to actually understand whats going on a little bit more, if someone knows some more resources that relate to this? i've mainly arrived here by trial and error.(i know this is not c#) but this is more a conceptual question.
8 Replies
maths is not my strong suit so you'll have to bear with me a bit, but first you need to know the coordinates of the centre point and the point you want to rotate in the same co-ordinate system
so you need those points to be both in world space or local space, whatever that means in your application
then you can use something like this
think my coordinates system might be messed up but it works
I hate maths, my head is already spinning
by how many degrees
<a:gpa_pepe_spinhmm:985633122240573472>
it never ends
just spent the last few hours wrestling with github's garbage CI, then I decided to help someone with a maths question for no particularly good reason
sorry it was 1am when i posted the question i will have feedback after work today!!
cant be late for work -.-
you could also use Matrix4x4 with all its transformation functions to create a transformation matrix and multiply your vector with it
it'll be a lot less work