Hi,
In demo scene, I tested as below: replace MeshCollider of HangLedge Object by BoxCollider. The Hang Ability stop at the line 307:
// Ensure there is space above the hit object.
var raycastNormal = Vector3.ProjectOnPlane(raycastHit.normal, m_CharacterLocomotion.Up).normalized;
var rotation = Quaternion.LookRotation(-raycastNormal, m_CharacterLocomotion.Up);
var startPosition = MathUtility.TransformPoint(raycastHit.point, rotation, Vector3.up * 0.1f) - (raycastNormal * 0.1f);
if (!Physics.Raycast(startPosition, -m_Transform.up, out raycastHit, 0.11f, 1 << hitObject.layer, QueryTriggerInteraction.Ignore)) {
Debug.LogError("Stop here");
return null;
}
What should I do to work with Box Collider. Help me Please.
Thank you very much.
In demo scene, I tested as below: replace MeshCollider of HangLedge Object by BoxCollider. The Hang Ability stop at the line 307:
// Ensure there is space above the hit object.
var raycastNormal = Vector3.ProjectOnPlane(raycastHit.normal, m_CharacterLocomotion.Up).normalized;
var rotation = Quaternion.LookRotation(-raycastNormal, m_CharacterLocomotion.Up);
var startPosition = MathUtility.TransformPoint(raycastHit.point, rotation, Vector3.up * 0.1f) - (raycastNormal * 0.1f);
if (!Physics.Raycast(startPosition, -m_Transform.up, out raycastHit, 0.11f, 1 << hitObject.layer, QueryTriggerInteraction.Ignore)) {
Debug.LogError("Stop here");
return null;
}
What should I do to work with Box Collider. Help me Please.
Thank you very much.
Last edited: