First person perspective Item/weapon moves out of view when character crouches (height change)

icecreamcone

New member
I created a character that has both perspectives.
I created a first-person weapon and adjusted its position offset in the "first person perspective item (Script)".

When the character is standing or running in the first person perspective, my weapon is displaying properly and in the correct visible location I set it to be on the
script component.

However, once I crouch with the character in first person (height change), my weapon is in a completely different position and is out of view from perspective. When I stand back up from crouching, the item is returned to it's proper position offset. It seems like the weapon doesn't follow or move down with the character whenever crouching is enabled. I have tried adjusting the first person perspective script but can't figure it out. Am I missing something?

In the demo, when Nolan is holding an item in first person and crouch is enabled, the item seamlessly adjusts/moves down to the height changed position. How can I recreate this when my character crouches?
 
Update: I found the issue but don't know how to fix it.
The problem isn't from crouching.

The issue is from switching to first-person perspective. For some reason, When I switch to first-person perspective, the hand animations are mirrored. The character holds the weapon in the opposite direction and the arms and hands are playing a mirrored holding animation. When I switch back to third person, the item returns to it's proper position.

But not because of the perspective scripts, instead, because of the animations playing on the character when switching. Any ideas why this is happening?

I am using the demo animator controller setup and using a humanoid rig for my first-person perspective arms, not generic (I don't know if that could possibly have something to do with it.) For my first-person perspective arms, i'm using the same demo animator controller for the animations.
 
That's an odd one that I haven't seen before. It could have something to do with using the humanoid animations for the first person view though I know that it should work since FPS Mesh Tool does the exact same thing. Maybe their tutorial will help show what went wrong even if you aren't directly using that asset?

 
No that shouldn't be the problem. The humanoid rig is working fine with my separated mesh. It could possibly be an issue with the characters IK? When switching to first person, maybe the arms are reacting to IK somehow? I'm really not sure.

Because now, I have discovered another issue to go along with my current issue and that's with the actual attacking animation. When my character attacks and is facing the camera in third person mode, his arms swing behind him and the animation looks waaay off. It looks bad. The arms will swing and clip inside the model's body. I'm really not sure why. But when the camera is behind the character and he swings, the animation plays fine.

So, I don't know if this new issue is related to my current issue or not with the weapon moving out of place when in first person view. I'm really not sure if this is all just an IK issue or something with the camera setup. I tried messing around with IK values and setting the hand weight to 0. But the weapon still swings awkwardly when the character is facing the camera in third person mode. And it goes out of place when in first person mode.

Any other ideas?
 
Update: Fixed the melee issue. It was an IK problem. Now he swings the weapon as should when facing the camera :)

But I still can't figure out the issue with the item moving out of position when crouching in first person view.
I'll keep trying to figure it out.
 
hi,
I created a chracter using ucc for fps only, but in crouch the pistols are not in front of camera.
I guess the camera is not moving correctly.
Anyone know how to fix this, I guess this thread was open about that that's why I am asking here.
 
Without more detailed information, it is hard to say what is going on. Always check first that the demo scene is working correctly, and then compare your setup to the demo. This most often helps to resolve issues.
 
Top