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"

Cant get mouse location in client

I'm trying to make a event that faces the player towards the mouse and then creates a projectile heading that direction. I have it working great in single player, but when I try it on the client it faces the cursor correctly, but it doesn't spawn the projectile in the right direction.

To get the mouse location I'm reading the hit result under cursor into a variable, which is then finding the look at rotation between that and the player to set the rotation. I'm then using that same mouse location variable to set rotation of the projectile, because if I just use the player rotation it's not always firing the right way.

This is really messing with my head, since I'm reading the mouse location in as a variable which the client is apparently reading to get its new rotation, but it's somehow being lost when I pass it to the actor spawning the projectile, but only as the client, the host is working as intended.

The client rotates towards the mouse perfectly, but the projectile is always created facing the origin, the server is functioning flawlessly.

In the images, "SC_Firebolt" is an actor spawned in and owned by "BP_BasePlayerCharacter".

Product Version: UE 4.12
bug1.png (236.8 kB)
bug2.png (270.7 kB)
more ▼

asked Aug 22 '16 at 11:27 PM in Blueprint Scripting

avatar image

16 1 2 4

(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