setting the value into scripts

This commit is contained in:
Glence 2022-11-23 20:48:40 +08:00
parent ca60b64a89
commit 8469ebd960
2 changed files with 8 additions and 7 deletions

View File

@ -8598,6 +8598,7 @@
Arm Yaw: 0 Arm Yaw: 0
Arm Length: 1 Arm Length: 1
Look At Camera Origin: true Look At Camera Origin: true
Target Offset: {x: 0, y: 0, z: 0}
IsActive: true IsActive: true
Scripts: Scripts:
- Type: SHADE_Scripting.ThirdPersonCamera - Type: SHADE_Scripting.ThirdPersonCamera

View File

@ -45,11 +45,11 @@ public class PlayerController : Script
//Movement variables============================================================ //Movement variables============================================================
[Tooltip("Max vel for walking")] [Tooltip("Max vel for walking")]
public float maxMoveVel = 2.0f; public float maxMoveVel = 3.0f;
[Tooltip("how much force is apply for walking")] [Tooltip("how much force is apply for walking")]
public float moveForce = 2.0f; public float moveForce = 50.0f;
[Tooltip("increase the moveForce and maxMoveVel by its amt")] [Tooltip("increase the moveForce and maxMoveVel by its amt")]
public float sprintMultiplier = 2.0f; public float sprintMultiplier = 1.5f;
private float oldForce; private float oldForce;
private float maxOldVel; private float maxOldVel;
@ -60,15 +60,15 @@ public class PlayerController : Script
public bool isMoveKeyPress { get; set; } public bool isMoveKeyPress { get; set; }
[Tooltip("How fast player will turn")] [Tooltip("How fast player will turn")]
public float rotationFactorPerFrame = 1.0f; public float rotationFactorPerFrame = 5.0f;
//Jumping vars================================================================== //Jumping vars==================================================================
[Tooltip("max height of the jump")] [Tooltip("max height of the jump")]
public float maxJumpHeight = 4.0f; public float maxJumpHeight = 1.0f;
[Tooltip("max amt of time it will take for the jump")] [Tooltip("max amt of time it will take for the jump")]
public float maxJumpTime = 0.75f; public float maxJumpTime = 0.5f;
[Tooltip("increase gravity when falling")] [Tooltip("increase gravity when falling")]
public float fallMultipler = 2.0f; public float fallMultipler = 3.0f;
private float initialJumpVel; private float initialJumpVel;
private bool isGrounded = true; private bool isGrounded = true;
private float gravity = -9.8f; private float gravity = -9.8f;