Announcement

Collapse
No announcement yet.

Move weapon socket location depending on if "owner" or not

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Move weapon socket location depending on if "owner" or not

    Hi,

    I've been diligently studying networking inside of Blueprint for a while now, and am able for the most part to get the behavior I am hoping for. However, I'm now trying to "break" network replication, in a specific way, and cant for the life of me get it right.

    I am spawning a weapon for my player, from a "loadout component" at begin play. Now based on whether the player is the "owner" of that weapon, I would like it to either snap to a first person mesh socket, or a third person mesh socket. I am aware of the bOwnerNoSee tags, and was wondering if theres a way to tap into similar functionality and just have it attach to a different location. My weapon actor is set to replicates but NOT to replicate movement (Though I don't know if that matters, since there's no Movement Component?)

    I really thought the OwningClient RPC would be the way to go, but it's not giving me the behavior i expect.

    Hoping this can be done in BP because C++ isnt really an option for me right now

    Thank you for your help or any suggestions

    #2
    Update:

    This code here

    https://blueprintue.com/render/w10d45i4/

    Gets me 90% of the way there. The server sees his own weapon in his FP hands, and the clients weapon in their Third Person hands
    The clients see their own weapons in their FP hands, the other clients in their Third Person hands, but the Server characters weapon is in his FP hands, and floating out of his chest.

    SRV event and MC event are set to use Replicate to Server and Net Multicast respectively, I guess it doesnt come through on pastebin.

    Any thoughts why the server characters weapon location is incorrect on the clients but everything else works fine?

    Thanks

    Comment

    Working...
    X