RGUnity / redguard-unity

Main repository containing the Unity project and the wiki
MIT License
43 stars 2 forks source link

Simple Player Movement Controller #5

Open Thane5 opened 1 year ago

Thane5 commented 1 year ago

A simple movement system for the player, that lets players explore the game world. Some must-have features are

Keep in mind that in the future we will also have to add

It is up to you to decide how closely this original version resembles Redguard's original movement, however our goals are to eventually have one that feels indistinguishable from the original, as well as an alternate mode that feels like a more responsive, modern movement controller.

Thane5 commented 1 year ago

We should also consider using the new input system for this

Thane5 commented 6 months ago

I did some tests to find out wether we make a rigidbody-based character controller or use Unity's internal character controller component. While a rigidbody controller is more straightforward to work with in terms of adding jumps or physics interactions, it lacks some core features that the internal CC already has (like a slope limit, and ability to slide over steps)

Thane5 commented 6 months ago

Note on doing ground checks:

the CCs comes with an isGrounded variable, but this one reports incorrect values on steep angles.

A raycast also doesnt work for some reason - it causes the character to slowly sink towards the ground for the last few centimeters after jumping.

Best method seems to be a spherecast.

Thane5 commented 5 months ago

Elevator Jitters

There are occasional jitters when standing still on an upwards moving platform. I tried moving platforms through rigidbody physics instead of setting the position each frame, but in the end the only thing that helped was to reduce the skin width.

Thane5 commented 5 days ago

Climbing

Cyrus can not climb obstacels on waist height and hang on to ledges that are too high to climb directly.

He can also move left and right on them. Dropping down to exit climbing mode does not yet work.

Thane5 commented 1 day ago

It seems that Cyrus can not climb the stairs of the harbor tower. I am not sure if that ever worked in the first place, but it should definitely be fixed.