0% found this document useful (0 votes)
37 views6 pages

Swim Component

The document provides a step-by-step guide for integrating the Swim Component into a game project, including necessary settings and configurations. It outlines customization options for swim parameters and features, as well as instructions for creating exclusion zones. Additionally, it encourages users to leave feedback and offers support through Discord or email for further inquiries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views6 pages

Swim Component

The document provides a step-by-step guide for integrating the Swim Component into a game project, including necessary settings and configurations. It outlines customization options for swim parameters and features, as well as instructions for creating exclusion zones. Additionally, it encourages users to leave feedback and offers support through Discord or email for further inquiries.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Swim Component

Foremost, thank you. We hope that our asset will help you during your game dev journey. If so, don't hesitate
to leave a review on the marketplace, it means a lot to us! :)

The following steps will guide you through migrating this system into your project and merging it into an
existing character.

Do not forget to enable the Water plugin in your setting.



1. Open the “Swim Component” project.

2. Right-click on the “SwimComponent” folder in the content browser and select Migrate. Select the Content
folder of the project you want to migrate to.

3. Go to your project.

4. Create Action Mappings in your input settings (Edit → Project Settings → Input) with the following names,
and assign them to any keys/buttons you’d like: “ToggleDash” , “ToggleStrafe” , “UseTricks1” , “UseTricks2”

5. Create an Axis Mapping named MoveUp, and assign two buttons to it – one with Scale set to 1.0 (this will
move up) and one with Scale set to -1.0 (this will move down).

4. Open your existing character BP and add the BP_SwimComponent to it.



5. In your character BP’s class settings, add the BPI_Swim interface.

6. On the left side of the character BP, double-click on the Get Swim Component function in the Interfaces
category. Click on your BP_SwimComponent, drag a reference into the graph, and plug it into the Swim
Component input on the Return Node.

7. Add these events to your character event graph (or copy and paste them from the ThirdPersonCharacter
blueprint)
8. Compile and close the character BP.

9. Make sure that your character’s skeleton is ready for retargeting

[Link]-click on the included ABP_Swimming (SwimComponent\ Animations) and select Retarget Anim
Blueprints → Duplicate Anim Blueprints And Retarget. → Select your skeleton and complete the retarget.

[Link] the AnimBP you’re using for your character. In the main AnimGraph, create a Linked Anim Graph
node. Set its Instance Class to the retargeted ABP_Swimming (do not forget to compile if you can not see the
instance).
Plug your existing state machine / final pose result into the In Pose on the Linked Anim Graph, then connect its
output to the Output Pose.

[Link] and save the AnimBP.


Customizing the system
The SwimComponent have many parameters that allow you to customize how your character will behave.

BP_SwimComponent :

These properties can be accessed by selecting the component in your character BP, then locating the Swim
Parameters category in the details panel.

SpeedMaxSwim : Max speed while swimming

SpeedMaxSwimDash : Max speed while dashing

SpeedMaxSwimStrafe: Max speed while strafing


SwimDeceleration: How quickly the character stops swimming or "brakes"

JumpDiveDeceleration: The swim deceleration when entering the water after a jump

UseTurnInPlace? : Should use “turn in place” animations or not

UsePhysicsAnimation? : Use or not physics animations (for legs when jumping)

UseFx? : Use or not fx

UseBuoyancyHelper? : Use buoyancy feature (works with the UE Water system)

BuoyancyHelperValueToUse : As we have multiples buoyancy actors, in order to determine the Z location of


the water surface, we can choose between 0 = Use min Z value (this value prevent the character to fly over
water), 1= Use max z value, 2= Use middle z value
TraceDownDistanceCheckFloor : The height at which the character begins to swim or walk

UseAutoDiveAnimation?: Automatically use diving animations or not

MaxSpeedToStayAtTheSurfaceAfterJump: The maximum speed in Z to stay at the water surface after a


jump

You can also customize the height offset according to the height of your character by changing these 2
variables

When the character is in air and above water surface, you can perform tricks (only if the character is high
enough) by pressing ‘B’ or ‘N’


BP_WaterExclusionVolume :​

To create an exclusion zone, you must first drag and drop Waterbodyexclusionvolume (in UE by default), place
it where you want it, then add to your scene the actor BP_WaterExclusionVolume, then in the value water
exclusion volume, select the previously added Waterbodyexclusionvolume.
FAQ

Oceanology integration
ALS Integration and integration in general ? Please join the discord server

Conclusion

We really hope that this asset will help you in the development of your project. You will see the “best
practices” directly inside the demo map. If you have any other questions, do not hesitate to contact us
on discord or by email.

You might also like