Skip to main content
Skip table of contents

IdealTwin Base Character

The class IdealTwinBaseCharacter provides a base implementation for ACharacter. This class integrates essential functionality that simplifies development, providing support for both standard controls and touch devices. It offers a basic implementation that includes:

This class is designed to be inherited and allow the quick configuration of a custom Character with the previously mentioned functionalities.

This class is a class Abstract so it cannot be used directly in the level. To use it you need create a new Blueprint class to inherit from this one or use the others Character already predefined.


Preset Inputs configurations

The component IdealTwinInputComponent uses the system EnhancedInputThis allows you to configure Inputs as Assets and use them between different projects without having to configure them in each one of them.

This component already interacts with the functions created within the IdealTwinBaseCharacter for basic functions such as moving, zooming or rotating the camera for the view. These are internally binded inside the class to be executed directly.

Management of input actions from Blueprint

Linked implementations can be used by calling the functions that are exposed and can be overwrite if you do not use the "Call Parent". This allows you to obtain the values or completely change the behavior when receiving the inputs to manage the movement as desired.

image-20241216-080607.png

This allows the character to be controlled immediately, eliminating the need to configure inputs from scratch.


Displacement of the already integrated Pawn

Thanks to the bindeos mentioned in the previous point, the implementation of the character's movement is fully configured. When the character is placed on the level, it will be able to move immediately without requiring additional configurations.

This is done by calling directly to the motion functions of the UCharacterMovementComponent which, in addition to being applied to all angles of movement, allows the sensitivity of the movement to be configured.

image-20241216-081549.png


Smooth Camera Motion

The class incorporates within the handling of the camera a component USpringArmComponent. This component integrates with the camera to provide very useful features to do different functionalities:

  • Lag in the movements: This basically allows to have a delayed movement in the rotation and movement of the camera with respect to the character. This gives the sensation of smoothness in the moment of displacement and in the rotation of the camera, serving both for first person and orbital vision.

image-20241216-082048.png


Camera Zoom with Parameters

Using the USpringArmComponent has also added the ability to zoom the camera using its zoom feature. TargetArmLength which is the one that defines the distance from the camera to the pivot center of the component. By adjusting these values we can have a zoom effect having these characteristics:

  • Minimum and maximum range: Defined by properties exposed in the editor.

  • Zoom smoothness: Customizable to create more natural zoom transitions.

image-20241216-082350.png

Both in the IdealTwinWalkCharacter as in the IdealTwinOrbitalCharacter this configuration is present. The difference is that when you want a first person camera the zoom function will be disabled but will still have the same component composition when built with the value at 0.


Implementation with SwitcherPawnComponent

IdealTwinBaseCharacter is integrated with the SwitcherPawnComponentwhich facilitates dynamic switching between different player-controlled pawns orchestrated from the Player Controller and using GamePlayTags to do this.

Each Character within the level can create the tag for each of them and thus be able to make changes between them.

image-20241216-083413.png

Touch Mode support

The class is designed to work perfectly on touch devices. Using the Preset Inputsthe character supports:

  • Tactile movement: Touch the screen to move the character.

  • Touch camera rotation: Touch gestures to rotate the camera.

  • Touch zoom: Use of pinch gestures to zoom the camera in and out.

image-20241216-083646.png

Touch support is fully integrated, eliminating the need to implement separate systems for touch devices as far as the touch device is concerned. Character respect.


With this implementation, IdealTwinBaseCharacter provides a solid and versatile foundation for characters in Unreal Engine projects, accelerating development and facilitating the creation of highly polished user experiences.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.