Confirmed this is working with UCC 2.2f2 and HAP 1.1.5a, although I made other changes to suit my scene.
If you have issues, some of these suggestions might help:
Errors related to KinematicObjectManager.cs
Double click the error to open the code in Visual Studio, add a check on the Index parameter to be >= 0, for example:
Code:
if (characterIndex >= 0)
{
m_Characters[characterIndex].HorizontalMovement = horizontalMovement;
m_Characters[characterIndex].ForwardMovement = forwardMovement;
}
You may have to add that code check to the methods:
SetCharacterMovementInputInternal()
SetCameraPositionInternal()
SetCameraRotationInternal()
Or more. Note the name of the index parameter may be different depending on what method you are changing. It may be
cameraIndex, or
characterIndex or something else.
HAPDismount missing public methods
I just got the code from GIT and some of the methods are private so you cannot link them to M Rider events.
Edit the HAPDismount.cs script to make methods public.
For example change:
private void StartMount()
to:
public void StartMount()
Do the same to any other methods that don't show up for events, or just make them all public. It doesn't matter for just getting started.
The code is also missing the public field for the second camera, and the code to enable/disable it when mounting/dismounting.
You can manually add those to the Mount/dismount events easily enough as noted by
Maximuz24 above.
Camera Issues
There could be several issues here depending how you set things up.
Some things to check:
Malbers Freelook Target field is linked to your UCC character
Malbers Freelook Default State is set to CS Default Mount
Other integrations
While this integration approach can work, you may want to look into the other official integrations from Malbers, esepcially for other character controllers like Invector. They go through all the steps linking up camera events and other settings in a way that Malbers would support. You would of course have to customize things for UCC. This may work out better for you especially once you get into adding melee and ranged attacks while mounted. But this would also require more advanced coding and is likely not suitable for non-coders.
docs.google.com
Note that the official Malbers integration doc does link to what looks like an official Malbers/Opsive UFPS integration video, but it is from 2017 so no idea if it works.