Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

how to use RPC

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!

Product Version: Not Selected
more ▼

asked May 08 '19 at 07:55 AM in C++ Programming

avatar image


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question