playMaker

Author Topic: Transfering the old third person controller into the new in Photon Demo  (Read 2123 times)

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Hi,
I have been using a modified version of the OLD Photon demo files (the two scenes version) but having upgraded to V5 recently I notice that the Standard Assets Third Person set-up is different, uses Mechanim and is nicer.

I have tried to do a quick and dirty conversion, by copying all the PM FSMs over to the new third person demo chap. (Well actually, THATS also a modified asset, as Ive replaced the graphics, but NON-photon, working fine)
But then the Photon actions complain "Oh no, I haven't got a character controller, whine whine..." ... and provides a handy button to add one... of course pointless and useless, I know Ive tried.

I think I tried the current Photon demo files, and they seem to only provide the single lobby/game scene version.. not a biggie, but I did do a bunch of work to the old ones to choose separate characters that resulted in special spawn points... you may even remember me...

Im not too au fait with mecanim, and the standard assest char is perfect for me... just HOW DO I SQUASH IT INTO PHOTON?

UPDATE: (2 hours later)
Digging into the specific problem(above) that of the Animation synch complaining about lack of char controller.
I guess this component of the whole Photon malarky is 1.checking what animation is currently playing and IF its yours, sending that info out over the metaverse to ...
and 2. If its NOT yours, applying the info sent from some other chap to the character you can see in your client... lovely
SO.. with the new character controller (mecanim stylee) I suppose I have to do the same, So i imported the mechanim actions, BUT as mechanim works with parameters, and they can be int or bool, I suppose theres not a way to just "SNAPSHOT" the whole damn thing and send/pick-up that? Or do I have to send each parameter separately?

Would this following be correct?
Instead of the single Set FSM Int that just sends the variable Animation I use 6 (my character uses 6 different parameters. 4 Ints Forward, Turn, Jump, JumpLeg and 2 bools Crouch and OnGround)
SO 4 Set FSM Ints and 2 Set FSM Bools. First Get Animator Int and Get Animator Bools, store them, send them, and recieve them (If is NOT mine) and Set them using Set Animator Int and Bool...
Is that it??
Really?...
For F***s Sake... thats a boring evening ahead of me...

Anything else I have to do?






« Last Edit: November 22, 2015, 03:35:48 AM by markfrancombe »

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Transfering the old third person controller into the new in Photon Demo
« Reply #1 on: November 23, 2015, 07:29:51 AM »
bump?

600

  • Beta Group
  • Hero Member
  • *
  • Posts: 713
    • Flashing Lights
Re: Transfering the old third person controller into the new in Photon Demo
« Reply #2 on: November 23, 2015, 10:38:56 AM »
Hi, maybe you can send with RPC values that changed. Then have a scene obj with FSMs for each parameter, that find the photon owner and sets the animator. Send when changed, including self.

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Transfering the old third person controller into the new in Photon Demo
« Reply #3 on: November 26, 2015, 04:34:31 PM »
I wrote a reply, but something hanged and I lost it.. grrr.
OK Heres what Im trying.
On the Animation Synch FSM, instead of the previous Character Controller Get State Im trying to synch the Animator parameters: like this,

getting the parameter state, saving a variable in the variable synch repository (yes Ive set up the variable there) then setting it.
But it doesnt work.. I get this...

which is obviously wrong...

The Console is spitting out:


Any Ideas?

markfrancombe

  • Sr. Member
  • ****
  • Posts: 338
Re: Transfering the old third person controller into the new in Photon Demo
« Reply #4 on: November 27, 2015, 07:45:30 AM »
Got somewhere with this, new problem in new thread... Ill post solution here when I know what it is... :)