Crest Ocean System integration

i use the store version, i believe they are they same but with a few differences on performance and graphics, any idea how to implement this? its the only missing piece in my game :p
 
I created a empty game objects and placed all my ocean components in the inspector, and made its layer water , added the box collider and did as stated above
could you please make a video about it? it's been around 1 year and no one bothered to make one
 
I am using the Crest system with the standard swim ability. I set the "Water height detection method" to custom, and created a script that updates the water height every frame (through the SetWaterSurfacePosition() method of the swim ability).
Then I had to adjust the trigger height of the ocean to be on the level of the highest waves. I also had to set the "Surface buoyancy amount" of the swim ability to 0.5. With this if works just fine. Here's my minimal script.

Code:
namespace Ai.Atnc.Abilities
{
    using Opsive.UltimateCharacterController.AddOns.Swimming;
    using Opsive.UltimateCharacterController.Character;
    using UnityEngine;
    using Crest;


    public class SetWaterHeight : MonoBehaviour
    {
        private UltimateCharacterLocomotion characterLocomotion;
        private Swim swimAbility;
        private SampleHeightHelper sampleHeightHelper = new SampleHeightHelper();

        private void Start()
        {
            characterLocomotion = GetComponent<UltimateCharacterLocomotion>();
            swimAbility = characterLocomotion.GetAbility<Swim>();  
        }

        void Update()
        {
            var sampledHeight = SampleWaterHeight();
            swimAbility.SetWaterSurfacePosition(sampledHeight);
        }

        private float SampleWaterHeight()
        {
            var position = characterLocomotion.transform.position;

            sampleHeightHelper.Init(position, 0f, false);

            sampleHeightHelper.Sample(out float height);

            return height;

        }
    }
}

Im trying your implementation but can't figure out the,
"Then I had to adjust the trigger height of the ocean to be on the level of the highest waves"
Could you please help me understand your implementation?
 
You need to put a box collider around the whole area of the water and make sure the Y value is large enough that it conatains all the crest water.

In my scene I have a water collider that covers the whole scene, like this:
WaterCollider.PNG

Here are my swim ability settings:
swimAbility.PNG

And then add that script to your player and that should be it.
 
Also, if anyone has figured out how to bypass the need for the collider please let me know.
that is exactly what i was asking, using a collider is not realistic when you have a whirlpool of water or whenever there is a storm... it looks just off
 
My question is, can I use crest ocean system where i'm able to swim the tidal waves and the whirlpools in a realistic way?
 
water height detection should be Custom, and you should have the component attached to feed in the values. The collider becomes irrelevant after entering and triggering the ability, just make sure its higher then your waves, and deeper than you wish to swim underwater. From there play with the buoyancy value. I actually made a test with my Ultimate Seating Controller Asset and had Nolan driving underwater with the submarine even, and it was very very easy. There's instructions in the USC Documentation on how to achieve this.
 
water height detection should be Custom, and you should have the component attached to feed in the values. The collider becomes irrelevant after entering and triggering the ability, just make sure its higher then your waves, and deeper than you wish to swim underwater. From there play with the buoyancy value. I actually made a test with my Ultimate Seating Controller Asset and had Nolan driving underwater with the submarine even, and it was very very easy. There's instructions in the USC Documentation on how to achieve this.
Thank you so much for the asset! i bought it yesterday and you just replied! <3 ill make a video showing how i try to implement it so we can finally show exactly how to set this up. i bought USC to drive around water with the water asset made by NWH
 
A video would be great, I have been meaning to make one, well a few actually, just been so busy and videos take lots of time. Thankyou for your purchase :)
 

This video shows how im trying to follow this guide but failing:
I am using the Crest system with the standard swim ability. I set the "Water height detection method" to custom, and created a script that updates the water height every frame (through the SetWaterSurfacePosition() method of the swim ability).
Then I had to adjust the trigger height of the ocean to be on the level of the highest waves. I also had to set the "Surface buoyancy amount" of the swim ability to 0.5. With this if works just fine. Here's my minimal script.

Code:
namespace Ai.Atnc.Abilities
{
    using Opsive.UltimateCharacterController.AddOns.Swimming;
    using Opsive.UltimateCharacterController.Character;
    using UnityEngine;
    using Crest;


    public class SetWaterHeight : MonoBehaviour
    {
        private UltimateCharacterLocomotion characterLocomotion;
        private Swim swimAbility;
        private SampleHeightHelper sampleHeightHelper = new SampleHeightHelper();

        private void Start()
        {
            characterLocomotion = GetComponent<UltimateCharacterLocomotion>();
            swimAbility = characterLocomotion.GetAbility<Swim>();  
        }

        void Update()
        {
            var sampledHeight = SampleWaterHeight();
            swimAbility.SetWaterSurfacePosition(sampledHeight);
        }

        private float SampleWaterHeight()
        {
            var position = characterLocomotion.transform.position;

            sampleHeightHelper.Init(position, 0f, false);

            sampleHeightHelper.Sample(out float height);

            return height;

        }
    }
}
Please help, what am i doing wrong? what do i need to add?
 
This video shows how im trying to follow this guide but failing:

Please help, what am i doing wrong? what do i need to add?
You have done everything correctly apart from adding the collider for the water, the ability uses the collider to activate. The collider should be as big as your swim area :)
 
Top