Model Manager corrections

Cheo

Active member
Hello, the model manager needs two important fixes.

First of all, dear Opsive devs, for the love of god put a second if check under #if FIRST_PERSON_CONTROLLER to make sure that the player is using first person components, or make it so that GetFirstPersonObjects does not throw an error when they are not ! Simply put the model manager, just like the reloader in my previous thread, needs first person related lines to be commented when the third person persective alone is used, which should only simplify things, not break them.

Next, remember this issue ? It occurs again when using character switching. Here is a video example :

As you can see, there's no issue with the default character, but when switching to Rhea and equipping the assault rifle it is not positioned correctly, unless we switch back and forth from Atlas while keeping the weapon in hand. The pistol does not have this issue has it doesn't have an ik target. Whatever fix you found the first time, please apply it for this too !

The model manager, alongside the restructuration of UCC with an empty parent at the top, is a very welcome addition to UCC3, and we're this close to be able to fully exploit it ! Please please fix this, I have a skin showcase that's only waiting to be shared !
 
First of all, dear Opsive devs, for the love of god put a second if check under #if FIRST_PERSON_CONTROLLER to make sure that the player is using first person components, or make it so that GetFirstPersonObjects does not throw an error when they are not ! Simply put the model manager, just like the reloader in my previous thread, needs first person related lines to be commented when the third person persective alone is used, which should only simplify things, not break them.
I am looking at this one now. What part needs the first person symbol? Any place targetFirstPersonObjects is used there is the symbol, as well as GetFirstPersonObjects. There is a null check so if you are using a third person only character then it'll still work.
 
I think cheo means that an if(firstpersonComponents are on Character) check, in the case users have both first and third person but only have a third person character setup. Symbols are fine I believe.
 
Phew, I just spend 2 hours making a series of tests, I almost gave up but believe I have found the culprits : first person references, even unused or left to -1, on weapon modules. Here's one confirmed example : the Hitbox Collision module for Melee Action, even if its First Person array under Hitboxes is left to 0, and even if the weapon it is on is not equipped, will cause the error to happen. I cannot confirm for everything but I'm betting my money that it is the same for several other modules containing first person related parameters, for stuff like fire point or effect location.

The line causing an error is "m_FirstPerspectiveItemObjectParent = m_ModelManager.GetFirstPersonObjects(characterModel).gameObject;" in OnCharacterSwitchModels from CharacterItemPerspectiveProperties. More specifically, m_FirstPerspectiveItemObjectParent is null and I suppose that's what causes the error, as a parameter is not supposed to be null. Simply using this condition : "if (m_FirstPerspectiveItemObjectParent != null)" prevents the issue from happening.

Now I have to admit I don't understand symbol checks well - when using Sphere Overlap Collision instead of Hitbox Collision for example that section of the code is not reached. My guess is that since the first person hitboxes are initialized in an #if FIRST_PERSON_CONTROLLER section the object sent to OnCharacterSwitchModels passes this check as well ?

So yeah FastSkillTeam is right, that's more what I had in mind, but maybe it may not be necessary if the devs can reorganize symbol checks on modules. Either that or a simple check as I wrote is fine. Anyway I hope this whole investigation was helpful ! ?
 
Hmm, I just tried creating a new scene with that setup but I didn't get any errors. Do you still have that scene available? If so can you send it to support@opsive.com so I can take a closer look?
 
Ok I made another test and this time I SWEAR this is the actual culprit, or at least the actual lead to investigate : the FirstPersonObjects under each character. Even when using the third person perspective alone, it is necessary to have for each character. Here's one of the reason why it flew under my radar for so long : when creating a character for the first time with the character manager, this object is automatically added to each character. However, when updating a character, any added model will not have this object under itself.
I then suggest you try a new test with and without the FirstPersonObjects, and in any case if the character contains a first person perspective this object should then always be automatically added whether the character is just created or updated.
 
Thanks for tracking it down! Yes, it looks like if you have multiple character models added with a third person only perspective added it still adds the First Person Objects. Ok, I'll get that fixed. I should be able to submit this update next week.
 
Hello, I downloaded the latest update yesterday and my first thought was to come back to this issue ! It's better, but the model manager still can't be used as is. Here's another test video :


-Switching model with the rifle unequipped on the character's back puts it into the new character's hands.
-Weapon models can become interchanged.
-Most important, three errors can occur. You saw the first one in this video coming from ChildAnimator.SetHorizontalMovementParameter, but I stumbled onto two other ones yesterday caused by SetForwardMovementParameter and SetPitchParameter, ConsolePro (must have asset btw !) indicates a similar series of functions :

Capture d’écran (396).png

Capture d’écran (397).png


I've got a few more things to test, I may come back to this later. Hope this helps, this model switching mechanic really deserves to be perfect !
 
I gotta go so I don't have time to finish testing, but I've been trying to fix an annoying issue with the Model Manager for some time now (I thought this update would solve it) : my current character prefab has 3 models, each high quality with several clothing options using Clothing Culler, and there's no issue in Play Mode but when playing the build the character is stuck and the Monitors UI is incomplete, the attribute bars are missing. Sorry for this incomplete description, but by chance does this ring a bell ? More details on that tomorrow.
 
Thanks, I'll take a look. I'm not sure how I missed some of those. Before I submit the update I'll send you my changes to verify.

Sorry for this incomplete description, but by chance does this ring a bell ?
No, the attributes/UI are independent of the model so it sounds like a different issue.
 
Okay, I need to do some more digging on the build issue, in the meanwhile allow me to raise another issue, though a lesser one :


The Model Manager doesn't need all models to be active on start in order to switch through them, however models that are inactive on start can't look up or down. Is it really necessary ? I'm no performance expert but if not I assume it would be a good thing to fix this, as it would spare some performance instead of having several potentially heavy objects needlessly activated all at once.
 
It seems that my issue was solved my simply assigning the character to the Camera Controller, otherwise the Camera Controller was for some reason trying to get UCC from the second model. That's at least what I understood from the logs, but in any case that was a really weird and complicated issue, a custom script and Adventure Creator were apparently creating some interference but I was unable to get to the bottom of it.
Sorry if that was all a bit vague and unhelpful ! In any case, please let me know if it would possible to have the optional models deactivated on start, that would really be a plus for me ! The build issue only happened when several models were activated on start btw.
 
If anyone's reading this because they had the same issues as I did then don't worry, Justin and I worked on this and he made fixes for every issue the model manager had, so everything should be okay in the next update !
 
Top