Update for Pro Mounting System version 1.3 for Unreal Engine 4. This release brings new features for mounting characters that are not possessed such as other players, as well as some much needed stream lining in the Mounting and Dismounting Flow.
Mount Without Possession
It is now possible to mount a Pawn without taking control of it. This was a highly requested feature. The previous version of the plugin could accomplish this by ensuring there was no seat with the id of 0, but now a simple bool flag on the seat configuration of the mount now indicates that the Mount can be possessed. Mounts that cannot be possessed simply allow players to attach to them, Then you can use AI or other means to control the mount in your game. This same feature should also allow players to mount each other with out taking control away from the other player.
Mounting and Dismounting Signaling
You can now setup signaling to send to riders/players that another rider has got on or left the mount. This is intended as a foundation for future feature of seat changing.
Mounting and Dismounting Flow
In version 1.2 and earlier the programmatic flow for mounting often proved a bit confusing even for myself, the developer, let alone those using the system. For this reason I sought to streamline and clarify the mounting and dismounting flow.
Most of the Ambiguity in the system was in the “ADM Unified Controller Pawn Interface” which is supposed to be implemented by the Controller, the Pawn, and the Mount and the “Mount Rider” Interface which is implemented by the Mounting Pawn. The problem was that there was an inconsistency to the purpose of a few of the functions between these two interfaces. The two “Perform” functions “PerformMountPawn” and “PerformDismountPawn” where used as Prep functions for the Controller and the Mount, but Triggered the mounting process for the Pawn instead of acting as a prep function. Meanwhile the “Begin” functions found on the “Mount Rider” interface where used as the Prep Functions for the Pawn. This inconsistency caused a bit of dissonance within the overall design of the system and often lead to confusion.
To clear things up a bit I have made some additions to the “ADM Unified Controller Pawn Interface” and the “Mount Rider” Interfaces. Now the “ADM Unified Controller Pawn Interface” has two new functions called “PrepareForMounting” and “PrepareForDismounting” which is called on all 3 responsible classes (Controller, Pawn, Mount) to Prepare them for Mounting and in future releases can even be used to cancel mounting should one of those functions return false. The Controller Component itself now handles calling the Prep Functions for the Pawn and the Mount. For UE 4.23 “BeginMountingPawn” and “BeginDismountingPawn” will be categorized under Deprecated.
The next clarification lies with the “Mount Rider” interface which leveraged the “BeginMountingPawn” and “BeginDismountingPawn” functions, which behaved as Prep functions for the Pawn. Now “StartPawnMounting” and “StartPawnDismounting” behave as triggers to actually kick off the mounting process for the pawn. The Two Begin functions have now been categorized as Deprecated
This relegates the new "Prepare" functions for exactly that, preparing to mount or dismount, and the new "Start" functions to actually start the pawn mounting. This clarifies the purpose of these function and improves and separates the responsibilities of the two interfaces more clearly.
Unified Controller Pawn Interface
- PrepareToMount - Used for custom logic to prepare for mounting
- PrepareToDismount - Used for custom logic to prepare for dismounting
Mount Rider Interface
- StartPawnMounting - Intended to start the pawn's mounting procedure
- StartPawnDismounting - Intended to start the pawn's dismounting procedure
Mountable Pawn Interface
- SetSeatOccupiedAtIndex - Set a seat occupied at the specified seat index. Replacing SetSeatOccupied
- GetRelativeDismountDirection - Determine the best relative location for dismounting. Replacing GetRelativeDismountDirection
Soft Depreciated Functions
Unified Controller Pawn Interface
- PerformMountPawn - use PrepareToMount
- PerformDismountPawn - use PrepareToDismount
- IsCharacterMountable - Use IMountablePawn::IsMountablePawn returns false if actor does not implement the interface
Mount Rider Interface
- BeginMountingPawn - use StartPawnMounting
- BeginDismountingPawn - use StartPawnDismounting
Mountable Pawn Interface
- SetSeatOccupied - use SetSeatOccupiedAtIndex
- GetDismountDirection - use GetRelativeDismountDirection
Rider Controller Interface
- OnPawnPossessed - no longer needed with addition of OnPossess Event added to Controllers in 4.23
While for UE 4.23 and 4.24 you will not need to change any logic in your setup, several functions will be marked as depreciated in 4.25 which may cause problems. It is highly advised to switch over to the new functions as soon as possible.
- Remove all logic from PerformMountPawn and PerformDismountPawn Interface Functions for Mounts, Controllers, and Pawns
- Make sure that PrepareToMount and PrepareToDismount Interface functions return true for Mounts, Controllers, and Pawns
- Mounting Starts from the RiderControllerComponent "PerformMount" function which I like to call from the Controllers implementation of "PrepareToMount"
- Dismounting Starts from the RiderControllerComponent "PerformDismount" function which I like to call from the Controllers Implementation of "PrepareToDismount"
- Add Logic to SetSeatOccupiedAtIndex by calling MountablePawnComponent's function of the same name "SetSeatOccupiedAtIndex"
- Add Logic to GetRelativeDismountDirection (copy from GetDismountDirection)
- Remove any logic from the Horse and Pawn involving the Interface function OnPawnPossessed as this is no longer needed
- On your controller Override the OnPossessed function and call the RiderControllerComponent's function "SetControlledPawn" passing in the pawn from the event.
Because the Mounting Components exclusively leverage the Mounting System Interfaces it is important that the older functions remain callable by the Mounting System Until it is safe to remove. For this purpose I have decided on a three engine release cycle. For UE 4.23 and UE 4.24 will mark the start of the "Soft Deprecation " of older functions. All future deprecated functions will be under the category of "deprecated" within the interface categories. Then for UE 4.25 these functions will be given the Meta Tag of "deprecated" which will prevent them from being callable and overriden in blueprints. Finally in UE 4.26 these deprecated functions will be removed completely. The reason for this process is that because the components call these functions in the interface and need to continue to call these functions for backwards compatibility, giving them a deprecated Function tag actually causes the game to crash. So until the components no longer call those functions it is unsafe to add that tag.
For the remainder of UE 4.23 and 4.24 those deprecated functions will continue to work as normal just as they do in UE 4.22. When UE 4.25 is released all Deprecated Functions will be marked depreciated and no longer called by the components for that version which will be Pro Mounting System 2.0. This means UE 4.22 will be locked to the 1.2 version or earlier of the plugin; UE 4.23 and 4.24 will be locked to the 1.3 version of the plugin; and UE 4.25 and beyond will support the 2.0 version. However for owners of the 1.3 or 2.0 versions of the plugin this will not prevent you from copying the plugin into your local C++ project and using it in either 4.22 and 4.23 as the code should continue to compile and function regardless of what version of the engine you are using. But for official releases no new functionality will come to 4.22 or 4.23.
- No currently known issues
See Details for Pro Mounting System
Previous Version Release Notes 1.2