zroc
Member
Just wanted to point out to you in case you were not aware or they have not been reported.
Been doing a lot of stress testing with Swimming addon to see what I need to change for my needs, etc.. Upon my first test was to climb out of the water in the demo scene.
If you look away from where the player is climbing out of a mass number of log msgs get reported that the "Look rotation viewing vector is zero". Makes sense, but where in the heck is the msg coming from. Searched entire folders, etc. no msg avail to disable. Anyhow, because of this it also comes with an error which pretty much leaves the player potentially floating in the air or just idle and you can't return control back to the player unless you manually go into the inspector and disable "ClimbFromWater" ability which gets stuck in "Active" state. To avoid this a few things need to be added as a bandage, if you will, right now.
1) Open ClimbFromWater.cs ability script
2) In the AbilityStarted() Method, add a "Try/Catch" for fastest way to eliminate the breakage of execution when the error takes place;- starting roughly at line 87: The Entire Method should look like this:
3) In ShouldBlockAbilityStarted(......) Method, add an additional qualifier of " || startingability is ClimbFromWater ". Add this will eliminate the immediate breakage leaving the player stuck in an active ClimbFromWater ability with no input, etc.....
Method should look like this;
Still looking to see where the major issues is on this to resolve properly. As I said this is just a bandade as I've come across various bugs or glitches.
Been doing a lot of stress testing with Swimming addon to see what I need to change for my needs, etc.. Upon my first test was to climb out of the water in the demo scene.
If you look away from where the player is climbing out of a mass number of log msgs get reported that the "Look rotation viewing vector is zero". Makes sense, but where in the heck is the msg coming from. Searched entire folders, etc. no msg avail to disable. Anyhow, because of this it also comes with an error which pretty much leaves the player potentially floating in the air or just idle and you can't return control back to the player unless you manually go into the inspector and disable "ClimbFromWater" ability which gets stuck in "Active" state. To avoid this a few things need to be added as a bandage, if you will, right now.
1) Open ClimbFromWater.cs ability script
2) In the AbilityStarted() Method, add a "Try/Catch" for fastest way to eliminate the breakage of execution when the error takes place;- starting roughly at line 87: The Entire Method should look like this:
Code:
protected override void AbilityStarted() {
base.AbilityStarted();
m_CharacterLocomotion.SingleCast(m_Transform.forward, Vector3.zero, m_CharacterLayerManager.SolidObjectLayers, ref m_RaycastResult);
m_DetectedObjectNormal = Vector3.ProjectOnPlane(m_RaycastResult.normal, m_CharacterLocomotion.Up).normalized;
// The character should be positioned relative to the top of the hit object.
try {
if (m_RaycastResult.collider == null) { Debug.LogError("raycast.collider IS NULL"); }
var closestPoint = m_RaycastResult.collider.ClosestPointOnBounds(m_Transform.position);
var localClosestPoint = m_RaycastResult.transform.InverseTransformPoint(closestPoint);
var localMaxBounds = m_RaycastResult.transform.InverseTransformPoint(m_RaycastResult.collider.bounds.max);
localClosestPoint.y = localMaxBounds.y;
m_TopClimbPosition = m_RaycastResult.transform.TransformPoint(localClosestPoint);
m_InPosition = false;
m_Moving = m_CharacterLocomotion.Moving;
} catch (Exception e) {
Debug.Log("[ClimbFromWater.AbilityStarted] :error: Exception Caught: " + e.Message + "\n" + e.StackTrace);
}
}
3) In ShouldBlockAbilityStarted(......) Method, add an additional qualifier of " || startingability is ClimbFromWater ". Add this will eliminate the immediate breakage leaving the player stuck in an active ClimbFromWater ability with no input, etc.....
Method should look like this;
Code:
public override bool ShouldBlockAbilityStart(Ability startingAbility) {
return startingAbility is HeightChange || startingAbility is ClimbFromWater;
}
Still looking to see where the major issues is on this to resolve properly. As I said this is just a bandade as I've come across various bugs or glitches.
Last edited: