MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / SetParent

Method SetParent

Sources/OvCore/src/OvCore/ECS/Actor.cpp:131–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void OvCore::ECS::Actor::SetParent(Actor& p_parent)
132{
133 DetachFromParent();
134
135 /* Define the given parent as the new parent */
136 m_parent = &p_parent;
137 m_parentID = p_parent.m_actorID;
138 transform.SetParent(p_parent.transform);
139
140 /* Store the actor in the parent children list */
141 p_parent.m_children.push_back(this);
142
143 AttachEvent.Invoke(*this, p_parent);
144}
145
146void OvCore::ECS::Actor::DetachFromParent()
147{

Callers 5

OnDeserializeMethod · 0.45
AddActorByInstanceMethod · 0.45
EditorActions.cppFile · 0.45
DuplicateActorMethod · 0.45
HandleCameraOrbitMethod · 0.45

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected