Sorry in which script in can find this.Can you place a breakpoint within NavMeshMovement.Update and see if it gets to UpdateOffMeshLink?
also can you please help to set the zoom camera as well.thanksCan you attach just the scene that you are using?
please find attachment as you requested.I just tried baking your navmesh but Unity wouldn't bake (no idea why). Can you add the jumping offmesh links to this scene? This is the one that I have been using for testing.
protected virtual void UpdateOffMeshLink()
{
if (m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeDropDown || m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeJumpAcross ||
(m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeManual && m_NavMeshAgent.currentOffMeshLinkData.offMeshLink.area == NavMesh.GetAreaFromName("Jump"))) {
// Ignore the y difference when determining a look direction and velocity.
// This will give XZ distances a greater impact when normalized.
var direction = m_NavMeshAgent.currentOffMeshLinkData.endPos - m_Transform.position;
direction.y = 0;
if (direction.sqrMagnitude > 0.1f || m_CharacterLocomotion.Grounded) {
var nextPositionDirection = m_Transform.InverseTransformPoint(m_NavMeshAgent.currentOffMeshLinkData.endPos);
nextPositionDirection.y = 0;
nextPositionDirection.Normalize();
m_InputVector.x = nextPositionDirection.x;
m_InputVector.y = nextPositionDirection.z;
}
// Jump if the agent hasn't jumped yet.
if (m_JumpAbility != null && (m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeJumpAcross ||
(m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeManual && m_NavMeshAgent.currentOffMeshLinkData.offMeshLink.area == NavMesh.GetAreaFromName("Jump")))) {
if (!m_JumpAbility.IsActive && (m_FallAbility == null || !m_FallAbility.IsActive)) {
m_CharacterLocomotion.TryStartAbility(m_JumpAbility);
}
}
}
}
Thanks, I will wait for the update.Thank you! I see how you did it now. The NavMeshMovement ability doesn't recognize manual off mesh links but I just added support for it if if it has the Navigation Area set to Jump. If you update NavMeshAgentMovement.UpdateOffMeshLink to the following it'll fix this:
Code:protected virtual void UpdateOffMeshLink() { if (m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeDropDown || m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeJumpAcross || (m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeManual && m_NavMeshAgent.currentOffMeshLinkData.offMeshLink.area == NavMesh.GetAreaFromName("Jump"))) { // Ignore the y difference when determining a look direction and velocity. // This will give XZ distances a greater impact when normalized. var direction = m_NavMeshAgent.currentOffMeshLinkData.endPos - m_Transform.position; direction.y = 0; if (direction.sqrMagnitude > 0.1f || m_CharacterLocomotion.Grounded) { var nextPositionDirection = m_Transform.InverseTransformPoint(m_NavMeshAgent.currentOffMeshLinkData.endPos); nextPositionDirection.y = 0; nextPositionDirection.Normalize(); m_InputVector.x = nextPositionDirection.x; m_InputVector.y = nextPositionDirection.z; } // Jump if the agent hasn't jumped yet. if (m_JumpAbility != null && (m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeJumpAcross || (m_NavMeshAgent.currentOffMeshLinkData.linkType == OffMeshLinkType.LinkTypeManual && m_NavMeshAgent.currentOffMeshLinkData.offMeshLink.area == NavMesh.GetAreaFromName("Jump")))) { if (!m_JumpAbility.IsActive && (m_FallAbility == null || !m_FallAbility.IsActive)) { m_CharacterLocomotion.TryStartAbility(m_JumpAbility); } } } }
I will include a slightly more optimized version in the next update that doesn't have to convert the string every tick. But this should get you going. We are also going to be submitting the next update next week so if you don't want to make the code changes you don't have long to wait.