Player Character Setup
To create your own player character or use the existing one provided by YOM, follow these steps:
- 1.Creating a New Blueprint:
- Right-click in the Content Browser and select "Blueprint Class."
- In the window that appears, select "Character" if you want to start from scratch or "Other Classes" and search for "Yom_BP_ThirdPersonCharacter" if you want to utilize the existing functionality provided by Yom.
- 2.Assigning the Player Character:
- After creating your blueprint, don't forget to assign it as the player character to be used in your metaspace.
The Yom_BP_ThirdPersonCharacter already has built-in functionality that you can utilize or modify:
- 1.Random clothes: The character blueprint allows you to change the character's clothing options dynamically. This can be done in the Details panel of the blueprint.
- 2.Movement controls: The character can be controlled using the WASD keys for navigation.
- 3.Camera movement: The blueprint supports camera movement for both third-person and first-person perspectives.
- 4.Camera switching: You can switch between different camera views using the "Q" key.
- 5.Crouching: The character can crouch by pressing the "C" key.
- 6.Jumping: Jumping functionality is implemented using the "Spacebar" key.
- 7.Walking and running: The character can switch between walking and running modes by pressing the "Left Shift" key.
- 8.Touch support: The blueprint includes support for touch controls for movement and camera rotation, making it suitable for mobile devices.
- 9.Customizable settings: The blueprint provides options to adjust the walk and run speeds, as well as the starting view (first or third person). These settings can be modified in the Details panel of the blueprint.
If you want to modify or customize the functionality provided by Yom_BP_ThirdPersonCharacter, it is recommended to copy the relevant logic from that blueprint and paste it into your newly created blueprint. From there, you can make the desired modifications. If you don't want to use the provided functionality, you can simply copy the event graph and delete the logic while keeping the event.
Example Target Blueprint
The default controls for player movement and camera movement are predefined in the SDK. You can see the key bindings in the screenshot provided. If you want to modify these controls, you can go to Project Settings -> Input in the Unreal Engine editor. There, you can freely change the key bindings to suit your preferences.
Manually Changing the Player Asset
To modify the player asset, open the Content Browser in Unreal Engine and locate the MetaSpacePlayer or your custom Unreal PlayerController. In the Details panel, navigate to the "YomPlayer" tab. From there, you can select or replace the player character asset to be used in your metaspace.
Advanced player controller setup
There are more settings for a player besides the settings which are set in the Setup Window. This page will list all of the additional settings that can be adjusted. The extra settings can be accessed by opening the blueprint of your MetaspacePlayer. In the details section, there will be a tab called Yom Player, which will include the settings listed below.
Player Asset: The Player Asset setting was set in the setup window, but can also be changed here if needed.
Manual Spawn Location: The Manual Spawn Location setting allows creators to define their own manual spawning location. If you would like a fixed location you should set this to true and set a location in Manual Spawn Transform.
If you want to have dynamic spawning behavior you will need to implement the OnSpawn event in a blueprint graph. The graph should start with Event On Spawn and call Set Manual Spawn and Spawn Player Instance (both are functions of self), which will set the spawn point and spawn the player. An example of such a graph can be found below: