x

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 spawn projectiles from different start locations depending on whether viewed in first or third person (multiplayer)?

Currently working on a multiplayer FPS. When firing weapons I am spawning projectiles from a 'muzzle' socket on the gun. This works fine when viewed from first person, but if you see another player firing the projectile it is not originating from their weapon. This is due to both first / third person using different skeletons / animations.

How would I blueprint it up so that the projectile originates from the appropriate weapons socket depending on how it is viewed by the player?

Product Version: UE 4.11
Tags:
more ▼

asked May 10 '16 at 04:44 PM in Blueprint Scripting

avatar image

Dokukai
1 1 3 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Place a socket on the Skeleton Asset for each of them, using the same name so you can access it's location from BP without worrying about different names. Also, make the socket's parent be the same bone that controls the gun movement, so it'll move correctly with the gun. Then, in BP, the spawn location will be SkeletalMesh->GetSocketLocation using your socket's name.

more ▼

answered May 10 '16 at 10:13 PM

avatar image

RVillani
1k 27 32 87

avatar image Dokukai May 10 '16 at 10:29 PM

I already have the sockets for both, this is not the problem. The problem is, during a multiplayer game when you fire from the first person weapon socket, other players see it coming from that socket and not the third person weapon socket. Somehow I need to spawn a projectile that only players see when in first person and another that players only see from other players third person models. I just have no idea how to make this work over network.

avatar image RVillani May 10 '16 at 10:51 PM

Ah I see. I haven't messed with multiplayer yet, but there's an option I'm always stumbling upon in the Actors. It's called Only Owner See/Owner no See or something like that.

So you'd spawn two projectiles every time: one from the 3rd person socket and one from the 1st. Then, you'd set the 1st person one for only the owner player controller to see. And the 3rd person one for only the owner not to see.

Here's one of the nodes and here's another related question that might help.

(comments are locked)
10|2000 characters needed characters left
Your answer
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