This repository has been archived by the owner. It is now read-only.
CPedIK finished, bit of CCamera #299
Merged
Conversation
| RwFrame *frame = m_ped->m_pFrames[PED_UPPERARMR]->frame; | ||
| RwMatrix *matrix = GetWorldMatrix(RwFrameGetParent(frame), RwMatrixCreate()); | ||
|
|
||
| RwV3d upVector = { matrix->right.z, matrix->up.z, matrix->at.z }; |
erorcun
Jan 30, 2020
Collaborator
don't we have macros for that? i'm asking because I don't know. up and at aren't really up and at as you know.
don't we have macros for that? i'm asking because I don't know. up and at aren't really up and at as you know.
Sergeanur
Jan 31, 2020
Author
Collaborator
Unlikely. Previously reversed funcs were doing the same.
Unlikely. Previously reversed funcs were doing the same.
| { | ||
| float f = clamp(DotProduct(mat->up, CVector(0.0f, 1.0f, 0.0f)), -1.0f, 1.0f); | ||
| *yaw = Acos(f); | ||
| if (mat->up.x > 0.0f) *yaw = -*yaw; |
erorcun
Jan 30, 2020
Collaborator
if we have macros for that you may also consider changing these in Extract... functions to their macro counterparts
if we have macros for that you may also consider changing these in Extract... functions to their macro counterparts
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.