# CompanionFollowPlayerBehaviour

CompanionFollowPlayerBehaviour is a MovementBehaviour that controls companion movement to keep up with their owner. They have several important variables that control the exact motion of the companion.

## Public Variables

<table><thead><tr><th width="212">Name</th><th width="150">Type</th><th width="259.6050012913419">Notes</th><th>DefaultVal</th></tr></thead><tbody><tr><td>PathInterval</td><td>float</td><td>The delay that dictates how often the companion will update it's pathing to the player's position. Represents seconds, with the default being every quarter of a second.</td><td>0.25f</td></tr><tr><td>DisableInCombat</td><td>bool</td><td>Controls whether the companion will continue attempting to follow the player in combat.</td><td>true</td></tr><tr><td>IdealRadius</td><td>float</td><td>How close the companion wants to be to it's owner. They will stop approaching when inside this radius. Measured in tiles.</td><td>3f</td></tr><tr><td>CatchUpRadius</td><td>float</td><td>Another radius measured in tiles. When beyond this radius the companion will increase it's speed to keep pace with it's owner.</td><td>7f</td></tr><tr><td>CatchUpAccelTime</td><td>float</td><td>How long it takes the companion to reach it's max catch-up speed. Measured in seconds.</td><td>5f</td></tr><tr><td>CatchUpSpeed</td><td>float</td><td>The companion's initial catch up speed upon beginning it's catch-up attempt.</td><td>7f</td></tr><tr><td>CatchUpMaxSpeed</td><td>float</td><td>The companion's top catch-up speed that it will slowly accelerate to over the amount of time dictated in CatchUpAccelTime.</td><td>10f</td></tr><tr><td>CatchUpAnimation</td><td>string</td><td>The animation that plays when then companion is attempting to catch up to it's owner. (Eg: Super Space Turtle retreating into his shell)</td><td>null</td></tr><tr><td>CatchUpOutAnimation</td><td>string</td><td>The animation that plays when the companion has successfully reached it's owner after a catch-up attempt. (Eg: Super Space Turtle popping out of his shell)</td><td>null</td></tr><tr><td>IdleAnimations</td><td>string[]</td><td>A list of idle animations that the companion will pick from at random to play when it's not doing anything else.</td><td>null</td></tr><tr><td>CanRollOverPits</td><td>bool</td><td>Determines whether the companion has the ability to roll to get over pits, like the dog.</td><td>false</td></tr><tr><td>RollAnimation</td><td>string</td><td>The animation that plays when the companion attempts to roll over a pit.</td><td>"roll"</td></tr></tbody></table>
