GorkaGames
Member
Hi Justin,
I have my own boats' controller that I can update in Fixed Update. It needs a Kinematic Rigibody.
Looking documentation at:
https://opsive.com/support/documentation/ultimate-character-controller/moving-platforms/
It seems reading that you need to add the Moving Platform component to your controller but reading the code it only updates the moving platform and I don't want that as I move my own boat.
I have just changed my layers on the boat to "MovingPlatform" and apparently it works (no need of Moving Platform component). So my question: Do I need any custom Moving Platform component to pass any info to the character controller or does it work without it?
EDIT:
I have created a custom "Moving Plataform" and basically update the Movement as you do and works fine:
Feedback: Its' not clear in the docs that you can use your own Kinematic controller, I think you should add a very easy template as this one so people can create their own controllers and avoid jittering.
I'm so happy that I can walk on the boat's deck while the boat is moving and VERY smoothly. I had to use 2 different controllers (one "normal" and one Kinematic) before to do so. Great work!
I have my own boats' controller that I can update in Fixed Update. It needs a Kinematic Rigibody.
Looking documentation at:
https://opsive.com/support/documentation/ultimate-character-controller/moving-platforms/
It seems reading that you need to add the Moving Platform component to your controller but reading the code it only updates the moving platform and I don't want that as I move my own boat.
I have just changed my layers on the boat to "MovingPlatform" and apparently it works (no need of Moving Platform component). So my question: Do I need any custom Moving Platform component to pass any info to the character controller or does it work without it?
EDIT:
I have created a custom "Moving Plataform" and basically update the Movement as you do and works fine:
Feedback: Its' not clear in the docs that you can use your own Kinematic controller, I think you should add a very easy template as this one so people can create their own controllers and avoid jittering.
I'm so happy that I can walk on the boat's deck while the boat is moving and VERY smoothly. I had to use 2 different controllers (one "normal" and one Kinematic) before to do so. Great work!
Code:
private void UpdateRotation()
{
m_MoveRotation = BoatToCopyTransform.rotation;
}
/// <summary>
/// Applies the rotational movement to the Transform.
/// </summary>
private void ApplyRotation()
{
m_Transform.rotation = m_MoveRotation;
}
/// <summary>
/// Updates platform position according to the current movement interpolation mode.
/// </summary>
private void UpdatePosition()
{
m_MovePosition = BoatToCopyTransform.position;
}
/// <summary>
/// Applies the positional movement to the Transform.
/// </summary>
private void ApplyPosition()
{
m_Transform.position = m_MovePosition;
// Progress the move time and also store the updated metrics.
//m_MoveTime += m_MovementSpeed * 0.01f * Time.fixedDeltaTime;
}
Last edited: