Look Source Error on EVERY CHARACTER created

BJPickles

Member
Reinstalled, reimported etc etc. Freshly updated for everything.
UTPM.

Yet when join Pun Room, look source error happens. I can still control character and pickup items, however the IK arms are broken so when I swing a weapon, the arms fly through the body. (This is with the appropriate weights added and the character has been tested to work in singleplayer absolutely fine).

I can't tell you how infuriating this is.


Workflow:

1. Create UTPM character.
2. Setup IK weights (the melee preset etc)
3. Setup PUN character through manager.
4. Assign character into spawn manager.
5. Start scene from menu and play.
6. Upon joining room, error appears.

I've done this about 4 times now. I've completely removed UTPM from the project, then updated from asset store, then imported the fresh update, set everything up etc.
Just doesn't work.

Happened all of a sudden for no reason.
 
Update on this:

The FIRST time a character is created following that workflow, there is no error (the 1h sword ik weights are still broken, unless there is a shield), however if you open up a prefab, it says changes have been made. Upon saving, the look source error appears.

Also note: Duplicating a playable PUN character also transfers the look source error onto the new character.
 
OH DEAR. MY BAD.

IK weights are breaking because I needed to add single instances of the 1h swords (as opposed to sword AND shield).

Look source error still occurring.
 
Just so we are on the same page, do you get the error within the demo scene of a fresh project?
 
Just so we are on the same page, do you get the error within the demo scene of a fresh project?
Hm, no. Odd.

I've noticed that the (PUN) demo in my project, the character falls through the floor and the camera doesn't attach.

Camera attches in the UTPM demo, but falls through the floor. Moreover the doors don't open.
I had to set them to the "visual effect" layer in order for it to operate.

I've been through the whole "setup layers" thing a few times now and it doesn't seem to have any effect.

Whats interesting is that damage is rarely sent between characters when using the melee weapons, too. Occasionally they'll hit but I have no idea why the damage is being sent so intermittently.

I can swing at the characters for a good 5 minutes, and then suddenly land 3 hits at once.
 
I forgot to add that I'm using a custom spawn manager, but the error appeared before I set this up.

On click to set ID of which character i set.

The only other thing that I can think of is that something is messing with the layers.

There is only one look source error when joining the PUN room, and gameplay wise it is absolutely fine.

I'm just concerned that its having an impact on the lack of damage being sent.
 
Upon creating a character, then setting it up, then turning into a PUN character, and then saving it as a prefab and NOT editing it further, the first time it is initialised I don't get the look source error.

Post this point, if I open the prefab to edit the collider slope or something, or even just reset the transform - I then get the look source error.
 
The look source error will happen when the character doesn't have a look source. This look source is either the camera or the PunLookSorce. Are you getting an error with just a single character? The look source should be attached from the NetworkCharacterLocomotionHandler.Start. If AttachCamera is true then the camera will be attached to the character within that method. I would start to debug there.
 
Every character created gets the look source error.

I've double checked and each of them have the PUN Look source script attached to the prefab.

Attach camera is true (otherwise I get infinite error spam).

I'll have a poke around, might be the camera?
 
If every character gets the look source error then it should be easier to debug. I would start with just a single instance in the Unity editor and place a breakpoint within MovementType.OnAttachLookSource. You can then look at the call stack to determine where it is being set. It sounds like something is setting the look source to null (or not at all, though it should within the NetworkCharacterLocomotionHander for remote players).
 
Top