MCPcopy Create free account
hub / github.com/MergHQ/CRYENGINE / SetPosRotScale

Method SetPosRotScale

Code/CryEngine/CryEntitySystem/Entity.cpp:1087–1125  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

1085
1086//////////////////////////////////////////////////////////////////////////
1087void CEntity::SetPosRotScale(const Vec3& vPos, const Quat& qRotation, const Vec3& vScale, int nWhyFlags)
1088{
1089 int changed = 0;
1090
1091 if (m_bNotInheritXform && (nWhyFlags & ENTITY_XFORM_FROM_PARENT)) // Ignore parent x-forms.
1092 return;
1093
1094 if (CheckFlags(ENTITY_FLAG_IGNORE_PHYSICS_UPDATE) && (nWhyFlags & ENTITY_XFORM_PHYSICS_STEP)) // Ignore physical based position in editor related entities
1095 {
1096 return;
1097 }
1098
1099 if (m_vPos != vPos)
1100 {
1101 nWhyFlags |= ENTITY_XFORM_POS;
1102 changed++;
1103 CHECKQNAN_VEC(vPos);
1104 m_vPos = vPos;
1105 }
1106
1107 if (m_qRotation.v != qRotation.v || m_qRotation.w != qRotation.w)
1108 {
1109 nWhyFlags |= ENTITY_XFORM_ROT;
1110 changed++;
1111 m_qRotation = qRotation;
1112 }
1113
1114 if (m_vScale != vScale)
1115 {
1116 nWhyFlags |= ENTITY_XFORM_SCL;
1117 changed++;
1118 m_vScale = vScale;
1119 }
1120
1121 if (changed != 0)
1122 {
1123 InvalidateTM(nWhyFlags);
1124 }
1125}
1126
1127//////////////////////////////////////////////////////////////////////////
1128void CEntity::CalcLocalTM(Matrix34& tm) const

Callers 15

SetPlayerPosAngMethod · 0.80
ExecuteMethod · 0.80
ExecuteMethod · 0.80
GotoTagPointMethod · 0.80
UpdateMethod · 0.80
PlayBackEntityEventMethod · 0.80
LoadEntitiesMethod · 0.80
PreparePlaybackMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected