Search Unity

A question on a combination of animation, networking and scripting all in one...

Discussion in 'Scripting' started by Kazzack, Jan 13, 2016.

  1. Kazzack

    Kazzack

    Joined:
    Mar 8, 2013
    Posts:
    27
    As the title says, my question kinda involves all 3 of the above, now the way I'm proposing I do this may not be the best way for me / this etc, so i'm open for all sorts of opinions...

    Basically, I am prototyping a medieval combat arena game. But after some development I would like to know some suggestions on how to approach this next step.

    Some background info...

    The player is split up into 2 major parts, a first person perspective and a 3rd person perspective, the game client uses and manipulates the first person perspective and the 3rd person perspective is updated and the client only see's the other player's 3rd person perspective through networking.
    Now, my question isn't about setting all that up etc, but, being a medieval combat game that focuses on melee combat, and certain mechanics rely on certain conditions to be met (Kind of like Chivalry for blocking for example.
    As mentioned above, all of the things a player can do has both a 3rd person animation and a first person animation, with first person being updated on the local to show feedback to the player and then the 3rd person updated across the network.

    The problem arises with some of the detections as because of the slightly different animations, A player's weapon is not where it is perceived to be. For example, a stab in first person (using first person animations) then updated on the network(using 3rd person animation), has slightly different Tip of the weapon (World transform) during the 'stab animation'. I mean although the character would be same location and rotation is synced perfectly (as much as it can) together, because of the slight difference of animations the detections would be slightly off?

    I can't think of another way that I could get around this...?
    Any Ideas?
    Or am I completely over thinking this, and should just test this when I get to this stage and not worry about a 'plan B' until I get to this point in the prototype.

    Like the exact whereabouts of the Weapon wouldn't matter anywhere near as much if I was using this approach for a shooter, but becauase of the combat logic relies so much on the exact pin-point location
    for detections / combo's etc, it seems like the approach I'm looking at going into may be an issue?

    If this is confusing and needs any extra clarifying, please reply and i'll re-explain in the morning and waaaaay less tired after a long day, my mind needs rest ;')
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Why are the animations different? I would think you would use the very same animations regardless of 1st-person vs 3rd-person perspective, which is just a matter of where the camera is placed (and perhaps which renderers are turned off).