Some problems with FP view

James

Member
Hi, I'm having some problems getting a few things correct.

1) I want to be able to see more of the weapon when in First Person. I can change the First Person Position Offset and that allow me to see more of the weapon but the fire point looks like its now below the gun in the perspective of the camera. This setting seems to offset the camera overlay but not the actual camera in terms of rendering. I set the FP and TP locations so that when transitioning they match on the rig properly, I dont want to allow the player to shoot over a wall in FP if they cant in TP.... I think you probably understand what i am saying.

2) When firing and turning/strafing, the projectiles don't match the fire point set at the tip of the barrel, they are either to the left or right depending on which direction I turn as I fire.

1635104910023.png
If I strafe right, the projectiles instantiate from this location.



1635104986797.png
In first person view, if I change the "First Person Position Offset" the overlay is moved up higher but the projectile is not lined up with the weapon.

You can see the projectile firing in the correct position on the right but the left FP view is not correct.
 
1) The fire point transform should be a child of the visible item's transform, so that when the visible item gets moved (by the Position Offset), the fire point moves with it. E.g. the demo scene Rocket Launcher has its Fire Point transform as a child of the visible item, like so:

1635155598142.png

2) Are you using Update or FixedUpdate for your character's update location? The projectile spawn happens in LateUpdate, so I wonder if using FixedUpdate allows the projectile to be fired before the character's position updates... try switching between Update/FixedUpdate to see if there's any difference.
 
@Andrew Yes, looks like it's part of the transform. I've tried both the below configurations with the same results.

1635591169926.png 1635591515736.png


https://gifyu.com/image/eVTr

re: "Are you using Update or FixedUpdate for your character's update location?"
I'm not using anything in particular, this is UCC default functionality on the projectiles so far.

Any other suggestions?
 
Also, is it possible to keep the arms in FP anchored to where the arms sockets should be, they really pivot wide/far from where the should be.
 
Where is your fire point? Can you reproduce the issue within the demo scene?

Also, is it possible to keep the arms in FP anchored to where the arms sockets should be, they really pivot wide/far from where the should be.
You can adjust the Pivot Position on the First Person Perspective component.
 
@Justin (see above) for the fire point.

I'll mess with the Pivot Position later and let you know..

The biggest issue I have atm is the projectiles not aligning with the gun properly.
 
Hard to tell without being in your project but it does still look like a fire point/projectile transform issue to me. Another thing you can check is the transform pivot point of the projectile prefab - if the pivot point is off from what you'd expect, then that can cause the point that it spawns to be off by the same amount. If the pivot is off, then you can probably just add an empty parent to the prefab object and use that to adjust the pivot point to where it should be (e.g. the back end of the projectile).

To check if your character is using Update or FixedUpdate, check the "Motor" section (in the UltimateCharacterLocomotion component) for the "Update Location". I doubt this is the cause, but I'm curious to know if anything changes if you switch that value.
 
It's tough to say without seeing your project. Can you reproduce it in the demo scene?
 
Hard to tell without being in your project but it does still look like a fire point/projectile transform issue to me. Another thing you can check is the transform pivot point of the projectile prefab - if the pivot point is off from what you'd expect, then that can cause the point that it spawns to be off by the same amount. If the pivot is off, then you can probably just add an empty parent to the prefab object and use that to adjust the pivot point to where it should be (e.g. the back end of the projectile).

To check if your character is using Update or FixedUpdate, check the "Motor" section (in the UltimateCharacterLocomotion component) for the "Update Location". I doubt this is the cause, but I'm curious to know if anything changes if you switch that value.
If that was the case, then wouldn't it always be off and not just when I am strafing from left to right?

What "seems" to be happening is that there is a short delay from when I click fire and when the weapon actually fires. I can click down and up faster than when the weapon instantiates a projectile... as I said "seems" I mean, it as if though the vector is captured when I click fire but then the small delay happens and instantiates the projectile at the vector it captured moments before essentially "too late".

If I stand still, it's perfect of course.. just when moving does it seem off.
 
Hm, I just had a dig through the source and I don't think the FixedUpdate thing should be an issue because the projectile should still get instantiated within the Update loop... (although I would suggest at least trying to switch between Update/FixedUpdate to see if anything changes) Bit stumped with this one. I would say that if you're able to repro it in the demo scene that would be useful for us to identify the issue, because so far I haven't been able to repro it on my end.
 
Top