-
Notifications
You must be signed in to change notification settings - Fork 24
Scripts.Movement
Wesley Haws edited this page Jun 8, 2017
·
7 revisions
Now requires that you make use of the "RainDropEffect" scripts that can be found here:
- https://github.com/EdoFrank/RainDropEffect or
- https://www.assetstore.unity3d.com/en/#!/content/59986
Both of the above are free.
Allows a player object to move around based on keyboard/controller input. Will play animations on Animators.
This is for the player object only.
Example Movement Controller Setup:
Parameter | Type | Description |
---|---|---|
Parkour Object Tag | string | Tag name. Objects tagged with this will be able to be jumped or hurdled. |
Parkour Distance | float | Raycast distance. How close you have to be to the tagged object to parkour on it. |
Walk Speed | float | Move speed when not running. |
Run Speed | float | Move speed when running. |
Limit Diagonal Speed | bool | Prevent/Allow moving faster when holding down forward and sideways keys at the same time. |
Toggle Run | bool | Legacy. Allow/Disallow toggling running. |
Can Jump | bool | Allow/Disallow vertical movement when pressing the jump key. |
Jump Speed | float | How fast/How high you will move vertically when pressing the jump key. |
Gravity | float | How fast the player object will fall. |
Falling Damage Threshold | float | How far the player object can fall before losing health. (Requires "Health" script to be attached at the same level) |
Slide When Over Slope Limit | bool | Fall along object when character controller slope limit exceeded. (Requires character controller) |
Slide On Tagged Object | bool | Tag Name. Tagged object will cause the player to continue to move in movement direction for a period of time. |
Slide Speed | float | Move speed of the player to continue to move after not pressing any key. |
Air Control | bool | Allow the player object to change direction in mid air. |
Anti Bump Factor | float | Prevent jittering effect. Default value sufficient but change if jittering occurs. Only use on as needed basis. |
Anit Bunny Hop Factor | float | Prevents a bouncing effect when holding the jump key. |
Anim | Animator List | Mecanim Animator list to apply animation to when moving. |
Health Script | Script | Apply the health script here. No other script will work. |
Ground Locked | bool | Can/Cannot leave the ground. |
Move Locked | bool | Can/Cannot move in any way. |
Move Up Only | bool | Can/Cannot move in X,Z direction (Locks camera as well). |
Move Side Only | bool | Can/Cannot move in forward or backward motion (locks camera as well). |
On Ladder | bool | If enabled can only move up or down. Locks camera to only allow looking up or down. |
Move Direction | Vector3 | Legacy. Do not add anything here. For script access only. |
Not Effected By Gravity | bool | To ignore the effect of gravity or not. |
Under Water | bool | Debugging purposes. If underwater or not |
Swimming | bool | Debugging purposes. If enabled will move in direction camera is facing |
Enter Pool | RainCameraController | Requires external package. Play the bubbles effect from this package |
Exit Pool | RainCameraController | Requires external package. Play the rain streaks effect from this package |
Enter Water Splash | ParticleEffect | Play this effect when entering water |
Underwater Bubbles | ParticleEffect | Continuously play this effect while underwater is true |
Top of Water Disturbance | ParticleEffect | Continuously play this effect while swimming is true but underwater is false |
Is Jumping | bool | Legacy? Just tells when the jump key is pressed |
Underwater Color | Color | Apply this color to the underwater fog |
Fog Amount | float | How thick the underwater color will be |
Play Underwater FX | bool | Debugging. Play the bubbles effect |
Play Exit Water FX | bool | Debugging. Play the rain streak effect |
The following is a list of github repositories that made all of this possible:
delta patches: https://github.com/OctopusDeploy/Octodiff
.net 4 implemented in Monodevelop: https://github.com/mono/mono
Tuples In Unity: https://gist.github.com/michaelbartnett/5652076
Octodiff: https://github.com/OctopusDeploy/Octodiff
Input Manager: https://github.com/daemon3000/InputManager