Freelook Camera Snaps Back after Attack

When Freelook Camera Inherit Position is true, the camera snaps back after an attack completes. It’s like the inverse of what it’s supposed to be doing.

Update when I have any other VCams in my State Camera. I don’t know if this is a unity bug.

Any thoughts on how to correct this?

A

Do you mean when you have a 3rd cam (right now, we’ve got the freelook camera and the targetting state camera).

Sorry - wasn’t clear there! Even when it’s just the two (Free came and targeting). If I remove the Targeting camera from the State Camera, then I don’t have the issue.

Problem exists when:

  • I have the Freecam and Targeting came enabled and within the State Camera

  • Inherit Position no the Freecam is enabled

There are hacky ways to avoid this I guess, like programmatically disabling Inheriting Position based on the state, but…yuck.

Any insight would be appreciated!

I played around with the blends, even creating a custom blend (so you can specify blend times for each transition), and seem to get that initial “snap” (though it should be facing the same direction as the TargetingState was) and then a slow blend to the camera’s actual settings… can’t seem to get around that no matter what I tried.
Of course, if the player is actively moving left or right when the camera moves to the freelook state, things get weird. Not much we can do about that.

I might have to send a video tomorrow to better illustrate - it’s definitely behaving not as intended (I downloaded the complete project from the course in comparison).

Hopefully that’ll clear it up (-:

Found the issue - it was me :grimacing:

In a nutshell - I’ve extended some of the features, and at some point was inadvertently calling the TargetingState every time I attacked. This would quickly Snap the camera to the Targeting position, but in a frame or two, would lead back to the FreeLook state since I had no target.

Brian - for all the nonsense you have to wade through, I hope they pay you well :sweat_smile:

I’m glad you were able to get this sorted!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms