Arms Disappearing After Camera Switch

Tester115

Member
Hello,

I am currently working on a script in which the player can switch between the Ultimate First Person Melee (UFPM) Controller and a Custom Third Person controller that I am working on by pressing 'TAB'. The character starts off in the third person perspective and the first switch to the UFPM goes well. The problem occurs when I switch to the third person controller again and then back to UFPM. Once this happens, the first person arms no longer appear or animate. I am currently accomplishing the switch by enabling and disabling the camera and controller objects for both perspectives based on a button pressing. Could this be confusing the first-person arms somehow?

I have also attached a link to my project in case anyone would like to take a look and see the issue first-hand.
 
Last edited by a moderator:
Please do not post links to entire projects - not everybody on this forum has a license to UFPM.

There is a lot that you have to take into account when switching perspectives. From the character controller standpoint it doesn't care what perspective you're in but for the camera and arms it really matters. I am not able to dive deep into custom code but I recommend starting to debug by ensuring the first person arms animator are playing the correct animations.
 
Please do not post links to entire projects - not everybody on this forum has a license to UFPM.

There is a lot that you have to take into account when switching perspectives. From the character controller standpoint it doesn't care what perspective you're in but for the camera and arms it really matters. I am not able to dive deep into custom code but I recommend starting to debug by ensuring the first person arms animator are playing the correct animations.

Ok, I have started taking a look at the animator and have noticed that the animator for the first person object is not entering the base state after changing perspectives. Which object/script controls that?
 
The animator parameters control when the animator switches states. Maybe your animator isn't being reset? You can call AnimatorMonitor.SnapAnimator to ensure the animator snaps to the current state.

In order to add support for a different third person character controller it is going to take a lot of work to get it all setup properly. Just curious - is there a reason why you don't just pick up UTPM? The two will allow you to switch perspectives seamlessly and will use the same character controller so everything is consistent.
 
I'm going to jump in here and say that mixing Opsive's own controller into another controller's code base is going to give you really unwanted grief, heartache and headaches. I strongly do not recommend it, it's either one or the other. Otherwise it will be like trying to install a incompatible component into your own PC - you'll likely damage something. In this case, it'll be your development time.
 
The animator parameters control when the animator switches states. Maybe your animator isn't being reset? You can call AnimatorMonitor.SnapAnimator to ensure the animator snaps to the current state.

In order to add support for a different third person character controller it is going to take a lot of work to get it all setup properly. Just curious - is there a reason why you don't just pick up UTPM? The two will allow you to switch perspectives seamlessly and will use the same character controller so everything is consistent.
I am mainly creating a souls-like game that transitions into a first-person view for precision aiming. My thought process was that it would be easier to build a third-person souls controller separately rather than try to edit an existing controller to behave like something else.

Edit: I'll have to do some more research though, it may be simpler than I would have guessed to change some of the behaviors of the Ultimate Third-Person Controller.
 
Top