public void AddColPoint(Transform a_Parent, Vector3 a_Point, Vector3 a_Normal) { Transform transform = new GameObject().transform; transform.position = a_Point; transform.parent = a_Parent; MovingColPoint point = new MovingColPoint(); point.m_Transform = transform; point.m_PrevPoint = transform.position; point.m_PrevRot = transform.rotation; point.m_Normal = a_Normal; point.m_PointRelativeToThis = a_Point - m_ControlledCollider.GetCapsuleTransform().GetPosition(); m_ColPoints.Add(point); }
//Called whenever this module is started (was inactive, now is active) protected override void StartModuleImpl() { base.StartModuleImpl(); //MOVINGCOLPOINT, see GroundedAnimatedAbilityModules for more details CEdgeCastInfo info = m_ControlledCollider.GetEdgeCastInfo(); Transform transform = new GameObject().transform; transform.position = info.GetEdgePoint(); transform.parent = info.GetEdgeTransform(); if (m_ReferencePoint == null) { m_ReferencePoint = new MovingColPoint(); } m_ReferencePoint.m_Transform = transform; m_ReferencePoint.m_PrevPoint = transform.position; m_ReferencePoint.m_PrevRot = transform.rotation; m_ReferencePoint.m_Normal = info.GetEdgeNormal(); m_ReferencePoint.m_PointRelativeToThis = m_ControlledCollider.GetCapsuleTransform().GetPosition() - info.GetEdgePoint(); }