Keep FPP viewtype but remove FPP items.

buhu

New member
After a quite some time working on character I decided to make a turn and disable FPP hands but keep FPP viewtype. I updated character - setted FPP hands to none and keep both perspective (in character manager). Looks like its working... but now in FPP viewtype when item is equiped I get null refference error from item.cs on lines 632, 641 and 1068 because there is no fpp items.
How can I keep the FPP view but get rid of fpp items?
 
*I managed to get rid of the errors by setting empty object (Torch) like that:
Screenshot_10.png

Now I only have one error at start:
Error: Unable to find the base object for item Torch. Ensure the item specifies a base object under the First Person Perspective Item

So I guess the setup should be different - any suggestions?
 
Within the Item Manager you should completely remove that perspective, rather than just setting the references to an empty object. On the Item GameObject you should no longer have any components which are for the First Person perspective.
 
I'm confused now... What you mean? - item manager is inside Character Manager tab in Unity. When I select Item Manager from dropdown Tools-Opsive-UltimateCharacterController-ItemManager then Character manager tab opens.
Screenshot_11.png
 
Oh, you were looking at the item manager. Ok, good. So what do you want to do? I thought you wanted to completely remove the first person perspective?
 
eeh... I have FPP and TPP viewtypes but I don't want to have fpp hands. Problem is with items in FPP. When I'm in TPP everything is fine, but when I switch to FPP I get errors connected with item.cs script on this line
public bool IsActive()
{
return m_VisibleObjectActive && m_ActivePerspectiveItem.IsActive();
}
I want to get rid of fpp part of items... without removing fpp viewtype
 
So you want to use the third person hands in a first person view? This workflow is not currently supported. When you are in a first person view it is expected that you have a first person item. The first person item can be faked by using something like the FPS Mesh Tool, though:

 
hmm... I was using TPP model in FPP view for quite some time already and items is the first time when I actually stubble upon a problem with this approuch. There is no way to block items from expecting their fpp version?
 
I need only first person perspective - no need for special hands animations and visable hands in FPP.

I guess this is what's my problem with UCC - everything is so rigged and connected. I can't just use some of features... I have to use them all.


See'ya in the next thread...
 
So your game is only first-person view and you don't need to see the first person arms or items? Well then you can just remove the first person perspective item component from the items in the Item Manager as Justin suggested.

But you said in a previous post that you were using TPP too, right..?
 
I didn't say I use only FPP view. I said I need only first person perspective - no features related to it (hands, items etc.). I have both perspectives and player can switch perspective freely and I want to use TPP model in FPP view (with changing head mesh material to transparent on switch ofc).

When I remove first person perspective item component I get errors (fpp base required) http://www.opsive.com/forum/index.php?threads/keep-fpp-viewtype-but-remove-fpp-items.5036/post-24739
and if I keep it that way FPP viewtype stops working - character moves only mouse forward direction no matter which button I press.
 
If you have a character with a first person perspective that has items the items need to be setup with the first person perspective items. You can use the third person animations with the first person weapons by using a tool such as FPS Mesh Tool.
 
Can't you just point me to the script and line of code where whole fpp items setup/activation is being processed and I will just comment out what is inside this void?
 
It's not just one location that the perspective item is used. The main location is in Item but for example the Item Actions also use it to determine the use location. You may be able to not set the perspective item to the first person perspective within Item.OnChangePerspectives, but this could lead to other problems.

Your best course of action is to use FPS Mesh Tool to create a first person perspective item using the third person animations. This workflow works well and you do not need to make any changes.
 
Top