|
Post by sickscore on Dec 17, 2016 2:51:05 GMT
Hey guys, I found two issues, maybe someone knows how to fix them. How to reproduce: 1. Open and close the inventory right after jump input. Your velocity goes crazy Maybe someone has a better idea than preventing inventory while jumping? 2. Change locomotion type to "Only Strafe". Move only mouse while crouching. Character stands up for turning and goes back into crouch pose. Any ideas how to fix this? Free locomotion type works just fine. Thanks, Cheers!
|
|
|
Post by Invector on Dec 17, 2016 13:53:05 GMT
Wow thanks for that report! The solution for the jump is very simple, just add a * Time.deltaTime on each line that has the " _rigidbody.AddForce" on the ThirdPersonMotor script at the following methods: //ControlJumpBehaviour method _rigidbody.AddForce(transform.up * jumpHeight * Time.deltaTime, ForceMode.VelocityChange); //AirControl method
if (jumpAirControl) { if (isStrafing) { _rigidbody.velocity = vel; _rigidbody.AddForce(transform.forward * (jumpForward * speed) * Time.deltaTime, ForceMode.VelocityChange); _rigidbody.AddForce(transform.right * (jumpForward * direction) * Time.deltaTime, ForceMode.VelocityChange); } else { _rigidbody.velocity = vel; _rigidbody.AddForce(transform.forward * (jumpForward * speed) * Time.deltaTime, ForceMode.VelocityChange); } } else _rigidbody.AddForce(transform.forward * jumpForward * Time.deltaTime, ForceMode.VelocityChange); and also in the: //GroundCheck method
if (groundDistance >= groundCheckDistance) { isGrounded = false; // check vertical velocity verticalVelocity = _rigidbody.velocity.y; // apply extra gravity when falling if (!onStep && !isJumping) _rigidbody.AddForce(transform.up * extraGravity * Time.deltaTime, ForceMode.VelocityChange); } else if (!onStep && !isJumping) { _rigidbody.AddForce(transform.up * (extraGravity * 2 * Time.deltaTime), ForceMode.VelocityChange); } Of course you will need to change some values in the Player Inspector, I manage to get nice results using: JumpForwad: 3JumpHeight: 25ExtraGravity: -10---------------------------------------------------- The second issue is also very simple to fix, open the ThirdPersonAnimator and at the StrafeTurningAnimation method, replace the first if to this: if (!isStrafing || isCrouching) Or you could also use crouch turnOnSpot animation if you have
|
|
|
Post by Invector on Dec 17, 2016 15:38:32 GMT
This fixes will be on the next and final update before the Shooter Release!
|
|
|
Post by sickscore on Dec 18, 2016 14:33:26 GMT
This fixes will be on the next and final update before the Shooter Release! WOW, thanks for the quick fix. Had no time to figure this out by myself One last small thing I've noticed: Run from a high place to fall down and don't release run key. When ragdoll is doing it's thing, the stamina meter is still decreasing. Thats all from me. Really awesome work - your TPC is amazing! Can't wait for the shooter release! Geers
|
|
|
Post by codeassembler on Feb 14, 2017 2:06:12 GMT
... Of course you will need to change some values in the Player Inspector, I manage to get nice results using: JumpForwad: 3JumpHeight: 25ExtraGravity: -10... I think you meant ExtraGravity : -1.0 ? Thanks a lot for all this info. It does solved the issues I was having in my project regarding almost not being able to jump while the notebook was not connected to a power outlet (low performance mode) - Luis
|
|
|
Post by mtdues on Feb 28, 2017 19:11:53 GMT
This fixes will be on the next and final update before the Shooter Release! WOW, thanks for the quick fix. Had no time to figure this out by myself One last small thing I've noticed: Run from a high place to fall down and don't release run key. When ragdoll is doing it's thing, the stamina meter is still decreasing. Thats all from me. Really awesome work - your TPC is amazing! Can't wait for the shooter release! Geers sry but may i ask you to send me the full ThirdPersonMotor SCRIPT with these modification i want to test ur fly system ty
|
|
|
Post by sickscore on Feb 28, 2017 19:49:25 GMT
WOW, thanks for the quick fix. Had no time to figure this out by myself One last small thing I've noticed: Run from a high place to fall down and don't release run key. When ragdoll is doing it's thing, the stamina meter is still decreasing. Thats all from me. Really awesome work - your TPC is amazing! Can't wait for the shooter release! Geers sry but may i ask you to send me the full ThirdPersonMotor SCRIPT with these modification i want to test ur fly system ty Sorry, I can't do that -> copyright.
|
|