Hello!I have searching the rpc for several weeks,but I am still confused about what is RPC.I really want some help! I want to change my project to multiplayer,for example,I want to pick something,such as, a rifle,
1、Using line trace to check my character is facing the rifle,and use a variety to save the address of the rifle.
2、Order my character to move to position of the rifle by UPathFollowingComponent in PlayerController.
3、When move completed,order the rotation of my character to face the rifle.
4、After facing the rifle,order my character play pick animation.
5、Create a USphereComponent as collision at the beginning to collide the rifle,then attach it to my character.
6、Put the rifle to my inventory and reset my character.
My questions are:
1、I have searching lots of information about replication and rpc for a long time,but I still can't understand it,could anyone explain the purpose of it?
2、The address of the rifle in Step 1 should be UPROPERTY(Replicated)?
3、How to use the collision events,such as overlap the rifle and attach it to character?
4、When and where to use rpc in Step 1-6,I really have no idea,anyone help!
May 08 '19 at 07:55 AM
in C++ Programming