Ive just started to dice into replication and I cannot for the life of me figure out this small little part. What i do in my code:
-Player pushed button, to call function “Cast Interaction Ray” in which the function is located in an Interaction Actor Component.
-From here we check if we hit something, and if this hit implements the “interaction interface”
-If it does implement the interface, then it’s “Interact” event/function in the actor
-From here we determine what to do, in this case, we attempt to ad it to our inventory, then destroy it
And that’s where it breaks down client side.
Now from what I’ve gathered, to call a RPC from some random object in the world, it needs to have an owner. To quickly attempt to get around this, right before I call the Event on the server i set the owner just to whoever is interacting with the object(im sure this is all bad/incorrect to do but just temporary to see if anything would change.)
Doing this allows me to call the event, and it does run. But even then in my code, its supposed to destroy the object which is doesnt do. Is it possible to just set the owner to the server? I’m curious what the CORRECT way to do this is! Or a decent tutorial because I cant seem to find anything with this scenario.
Any info helps!