Skip to content

Conversation

@jankrassnigg
Copy link
Member

@jankrassnigg jankrassnigg commented Aug 10, 2020

  • Splits up the proxy component into a base class and a capsule shape class
  • Removes the crouching feature from the proxy, and moves it into the ezPxCharacterControllerComponent
  • Adds teleporting functionality to the CC
  • Moves the origin of the CC to its bottom

The CC shape component (former "proxy") is now more basic, and has no specialized functionality like crouching anymore. Since it now has a base class, it can be replaced with a custom implementation more easily. This is for example needed when you want to replace the collision filtering behavior and some other low level CC behavior.

The ezPxCharacterController now implements the previous higher level functionality. Since it mainly acts as an example, it's no problem to have such features there.

The CC now also supports teleporting.

The origin of the CC was previously at its center. Crouching meant the CC got smaller and then basically fell to the floor. Other parts, like where the camera was located, didn't move at all during crouching, meaning they weren't really resized.
Now the origin of the CC is at its bottom. This helps placing the CC properly (teleporting, start point, etc). It has the side effect that resizing (crouching) has no effect on the camera position anymore.
There are many ways this could be handled. The ezPxCharacterController now takes a reference to a 'head object' (child node). Upon crouching, it will move that child object up and down.
If you have a custom CC impl, you will need to implement crouching behavior now as well.

* Splits up the proxy component into a base class and a capsule shape class
* Removes the crouching feature from the proxy, and moves it into the ezPxCharacterControllerComponent
* Adds teleporting functionality to the CC

The CC shape component is now more basic, and has no specialized functionality like crouching anymore. Since it now has a base class, it can be replaced with a custom implementation more easily. This is for example needed when you want to replace the collision filtering behavior and some other low level CC behavior.

The ezPxCharacterController now implements the previous higher level functionality. Since it mainly acts as an example, it's no problem to have such features there.

The CC now also supports teleporting.
@jankrassnigg jankrassnigg merged commit 3cde204 into dev Aug 11, 2020
@jankrassnigg jankrassnigg deleted the user/jk/ccc branch August 11, 2020 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants