Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
1.1.0:charactercontrolling [2024/01/29 13:39] – [User-Friendly Events] admin | 1.1.0:charactercontrolling [2024/01/29 15:05] (current) – [Speed] admin | ||
---|---|---|---|
Line 94: | Line 94: | ||
You can implement that yourself by OnMove and OnRotate event | You can implement that yourself by OnMove and OnRotate event | ||
- | === Speed === | + | === Speed === |
In case movement or rotation speed does not suit your needs. | In case movement or rotation speed does not suit your needs. | ||
Line 107: | Line 107: | ||
|CrouchingSpeedReduction|Factor of reduction on speed if state is fpCrouching. Values between 0.0 - 1.0 are allowed. Default value is 0.15.| | |CrouchingSpeedReduction|Factor of reduction on speed if state is fpCrouching. Values between 0.0 - 1.0 are allowed. Default value is 0.15.| | ||
+ | === Boost === | ||
+ | |||
+ | The boost mode getting triggered by the OnBoost event. | ||
+ | By default boost mode is active by holding the left shift key down or the left shoulder button on your gamepad. | ||
+ | |||
+ | " | ||
+ | And the current speed value can be the normal speed or reduced speed by crawling and crouching. | ||
+ | |||
+ | If boost movement is active, states should contain the fpBoost flag. | ||
=== Rotation Sideways | === Rotation Sideways | ||
Line 180: | Line 189: | ||
You can control the jumping height and the time it takes by the " | You can control the jumping height and the time it takes by the " | ||
+ | |||
+ | While jumping, states should contain the **fpJumping** state. | ||
JumpingHeight is a multiplier for the character height. | JumpingHeight is a multiplier for the character height. | ||
Line 224: | Line 235: | ||
|CrawlingAnimationTime|Time in seconds the animation takes to enter or leave the crawling state.| | |CrawlingAnimationTime|Time in seconds the animation takes to enter or leave the crawling state.| | ||
|CrawlingSpeedReduction|Multiplier to reduce regular speed while in crawling mode.| | |CrawlingSpeedReduction|Multiplier to reduce regular speed while in crawling mode.| | ||
+ | |||
+ | === Push / Pull === | ||
+ | |||
+ | Two states are not automatically handled, because developers always have to decide when pushing or pulling is activated. | ||
+ | |||
+ | When pushing is active states should contain the **fpPushing** state. | ||
+ | |||
+ | When pulling is active states should contain the **fpPulling** state. | ||
+ | |||
+ | ^Method^Description^ | ||
+ | |procedure Push(AEnabled : Boolean); | ||
+ | |procedure Pull(AEnabled : Boolean);| Manually activates/ | ||
=== Default Behaviour === | === Default Behaviour === | ||
Line 300: | Line 323: | ||
FFirstPersonCtrl.Camera := FCamera; | FFirstPersonCtrl.Camera := FCamera; | ||
</ | </ | ||
- | |||
- | You have some properties to optimize or configure your specific character movement: | ||
- | |||
- | ^Property ^Description ^ | ||
- | |MouseControllerSpeed|Get or set mouse controller speed. The value reduces movement speed on mouse interaction. Default value is 0.075.| | ||
- | |GamePadThumbstickSpeed|Get or set gamepad controller speed, when using thumbsticks to move. The value reduces movement speed on gamepad interaction. Default value is 0.5.| | ||
- | |Speed |Get or set speed of movement. A basis speed value applied to direction vector. Default value is 1.0.| | ||
- | |CrouchingSpeedReduction|Factor of reduction on speed if state is fpCrouching. Values between 0.0 - 1.0 are allowed. Default value is 0.15.| | ||
- | |RunningSpeedBoost|Boost factor on speed if state is fpBoost. Values between 1-1000 are allowed. Default value is 2.0.| | ||
- | |JumpingHeight |Get or set jumping height value. The value defines the height of jumping. Default value is 4.0.| | ||
- | |CrouchingHeight |Get or set crouching height value. The value defines how deep the character getting down. Default value is 0.5. | ||
- | |ShowCursor |You can show/hide mouse cursor while first person controller is running. (not working properly)| | ||
- | |RotationDragMode |Get or set FRotationDragMode value, which defines if camera rotation is only been applied, if mouse down is active.| | ||
- | |UseDefaultBehaviour |Activate / Deactivate default behaviour on hotkeys triggered.| | ||
- | |UseDefaultMovement |Activate / Deactivate default movement behaviour. This flag allows to disable default HotKey (W-A-S-D keys) / Gamepad (thumbstick) movement. This has no influence on camera rotation.| | ||
===== ThirdPerson Controller ===== | ===== ThirdPerson Controller ===== | ||