Hi
I’m looking for a way to have my player character (a Sphere gameobject) rotate both vertically and horizontally, yet have a gameobject attached to the player object that points in the same direction the player character is rolling but doesn’t rotate…
I have the player sphere object rotating as I want it but I can’t seem to get the additional gameobject to NOT rotate.
I’ve tried googling this and so far have come up with attaching a script to the ‘non-rotating’ gameobject with :
private Quaternion rotation;
void LateUpdate()
{
transform.rotation = rotation;
}
This allows the gameobject to follow the player sphere but doesn’t point in the direction the sphere is rolling, additionally it sort of bobs about a bit.
Anyone have a suggestion how to solve this or could point me in the right direction?
Thanks