dumbgamedev
New member
Hi,
I am trying to set the rotation to match another transform via the ability system. This seems like it should work, but the character actually just moves laterally and then off the screen (no rotation at all).
This is with no other abilities set. No other input on and third person.
I am trying to set the rotation to match another transform via the ability system. This seems like it should work, but the character actually just moves laterally and then off the screen (no rotation at all).
C#:
using UnityEngine;
using Opsive.UltimateCharacterController.Character.Abilities;
public class Observe: Ability
{
[SerializeField]
protected Transform m_MatchRotation;
public override void UpdateRotation()
{
var angles = m_MatchRotation.localRotation;
var rotation = Quaternion.Euler(new Vector3(m_CharacterLocomotion.DeltaRotation.x, angles.y, m_CharacterLocomotion.DeltaRotation.z));
m_CharacterLocomotion.SetRotation(rotation);
base.UpdateRotation();
}
}
This is with no other abilities set. No other input on and third person.
Last edited: