Skip to content
This repository has been archived by the owner. It is now read-only.

CPedIK finished, bit of CCamera #299

Merged
merged 5 commits into from Jan 31, 2020
Merged

CPedIK finished, bit of CCamera #299

merged 5 commits into from Jan 31, 2020

Conversation

@Sergeanur
Copy link
Collaborator

@Sergeanur Sergeanur commented Jan 28, 2020

No description provided.

src/peds/PedIK.cpp Outdated Show resolved Hide resolved
src/peds/PedIK.cpp Outdated Show resolved Hide resolved
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 };

This comment has been minimized.

@erorcun

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.

This comment has been minimized.

@Sergeanur

Sergeanur Jan 31, 2020
Author Collaborator

Unlikely. Previously reversed funcs were doing the same.

src/peds/PedIK.cpp Outdated Show resolved Hide resolved
src/peds/PedIK.cpp Outdated Show resolved Hide resolved
{
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;

This comment has been minimized.

@erorcun

erorcun Jan 30, 2020
Collaborator

if we have macros for that you may also consider changing these in Extract... functions to their macro counterparts

@aap aap merged commit 5794732 into GTAmodding:master Jan 31, 2020
1 check passed
1 check passed
@appveyor
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@Sergeanur Sergeanur deleted the Sergeanur:PedIK branch Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants