Forum rules - please read before posting.

Third Person Camera Rotate Bug

Rotating the third person camera causes it to spin off its axis and is also spinning quickly without my force. (regardless of the settings. Settings and video below.

Settings :



  • edited December 2018

    Your video shows the problem, but there's not enough to know the cause.

    The camera seems very high - for a vertical offset of only 2, is your game's scale very small? How tall is your Player character in units?

    Please share uncropped images of the camera Inspector, its hierarchy, as well as details of the "CursorHorizontal" input as defined in Unity's input manager. What buttons are you actually pressing during the video?

  • This is kind of a random issue - this has functioned correctly for a few years.

    I have noticed slight improvement with vsync off, and doesn't happen with every player.

    The main character is around 3 units high, so the scaling is not out of whack in any sense.

    camera inspector 1 :
    camera inspector 2 :
    input :

  • The Hierarchy as well, please. So you're using a controller, as opposed to the mouse that the video suggests?

    By "Player", do you mean player character - or person playing the game?

    If this doesn't occur for every Player character, then that'll be a factor too. Please share the Inspector for the Player in the video, and also try to find the difference between Players that show the issue or not.

    While testing, disable wall collisions on the camera so that we can rule it out. Let me know if it also occurs when relying on keyboard input, too.

  • edited December 2018

    Hierarchy :

    I mean person playing the game - this is the only character setup for this. Although, the same issue occurs in the only other scene with this setup. The camera is much closer, so the height shouldn't be the issue.

    The issue occurs on both controller and mouse (drag)

    I turned off wall collision detection and saw no difference.

  • Thanks for the clarification.

    I'll need to know the result of a bit of testing. Open up GameCameraThirdPerson.cs, and replace the contents of its UpdateSelf function with the following:

    transform.rotation = targetRotation;
    transform.position = targetPosition - (targetPosition - centrePosition).normalized * actualCollisionOffset;
  • wow - time flies. This did fix the issue. BUT it seems that the character is misfiring animations while in motion. Meaning, while moving, the animation keeps trying to snap back to the idle pose.

    This issue does not occur on a static camera, so I'm assuming it has something to do with this change.

  • The change only affects the camera - nothing to do with the character.

    This sounds like a new issue - you're going to have to elaborate with more detail and screenshots - there isn't enough here for me to go on.

  • Actually un-committing that change DID in fact fix it. As soon as I changed the code back it smoothed the running animation back out again. Here's a video demonstrating with the adjusted code you posted.

  • Password is : AC

  • edited March 2019

    Sorry, but I'm not clear. You said the problem was with the player "misfiring animations". The video shows some stuttering (related to relative position), but no evidence of the character trying to snap back to idle. Please elaborate on exactly what the problem is.

    What is your AC version? Issues related to the third-person camera were recently addressed in v1.66.1 - see if the latest release gives the same issue.

    It may be that you need to enable intepolation on your character's Rigidbody. Be aware that an alternative third-person camera is also available on the Downloads page.

  • I know I'm sorry this was confusing. I thought the misfiring animations was the issue. But changing the script back did fix this the stuttering...unfortunately I cannot update AC at this point because we've heavily modified it. (Something I would never do again in a future project)

    I will try this alt 3rd person camera.


  • Okay - I am attempting to update AC...maybe I can make this work.

    The only error I'm seeing is this :

    Assets/AdventureCreator/Scripts/Actions/ActionTeleportToObject.cs(21,16): error CS0246: The type or namespace name `RotationSettings' could not be found. Are you missing an assembly reference?

  • Hmm I did a lot of AC modifications. My approach was to mark every edited section or a line by a searchable comment eg. //EDIT by name: what I did.
    Then also mark the beginning of the file, before all the usings where edits were. //File contains edits by name.

    And then I'd update AC and review all the changes that happened in version control (git). Quickly commit the files that I haven't edited and scroll through and look for clashes in files that I have. Right now I think it takes somewhere between half-a-work day to a work-day to update AC versions. And of course some things break anyway, but at least it's not horrible. So if you intend to edit AC after the update I suggest some sort of a similar approach.

  • Hey thanks @Teshla ! This sounds like a great idea. I'll give this a shot.

    Chris go ahead and ignore that error. That is one of ours.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.