I'm reworking my character controller for an FPS and am trying to shoot a ray down that lifts up the player to a standing position.
Cutting out a bunch of code here's the jist of what I'm working with:
If you want the full code:
Setting position fighting with rigidbody.moveposition
Cutting out a bunch of code here's the jist of what I'm working with:
Code (CSharp):
- void Update()
- {
- transform.position = standPosition;
- }
- void FixedUpdate()
- {
- myRigidbody.MovePosition(transform.position + playerInput * Time.fixedDeltaTime * walkSpeed);
- }
Code (CSharp):
- using System.Collections;
- using...
Setting position fighting with rigidbody.moveposition