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"

I'm trying to fire a projectile from the center of my screen at my mouse position, but it will only fire to the left.

alt text

Here's what's happening, and here's my blueprint. I've been banging my head against the wall for a couple of days and any help would be very, very much appreciated.

alt text

Product Version: UE 4.11
Tags:
more ▼

asked Oct 02 '16 at 11:51 PM in Blueprint Scripting

avatar image

Rockst4rB4by
6 2 2

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

2 answers: sort voted first

Hey Rockst4rB4by,

This is how I would do it:

alt text

"Scene" is a SceneComponent used to fire the projectile from. As in, where the Projectile will start. Here is where the Scene is located on the Character.

alt text

more ▼

answered Oct 03 '16 at 03:40 PM

avatar image

ImVawx ♦♦ STAFF
6.8k 114 17 127

avatar image Rockst4rB4by Oct 03 '16 at 04:44 PM

Hey, thanks for getting back to me so quickly! That's not working for me though. I put that blueprint on an empty pawn actor right in front of my camera since I don't have a character in my game. Is that my problem? I'm trying to just use an invisible dummy object to fire it from the center of my camera. Thanks!

avatar image ImVawx ♦♦ STAFF Oct 03 '16 at 05:08 PM

I am not sure what to tell you, this is working on my end. Such as:

alt text

I also do not know what you mean by:

I put that blueprint on an empty pawn actor right in front of my camera since I don't have a character in my game.

Your game needs some sort of Pawn, either as a Pawn class or Character class. I don't understand why you would want to use another "dummy" Pawn to fire from with your own camera.

499771_result.png (550.3 kB)
avatar image Rockst4rB4by Oct 03 '16 at 06:03 PM

Ahh, gotcha. I'll just use the character blueprint then. How do I access the get Scene reference from the character blueprint?

avatar image ImVawx ♦♦ STAFF Oct 03 '16 at 06:04 PM

Add it as a component to the Blueprint with the Add Component button then search, "Scene"

avatar image Rockst4rB4by Oct 03 '16 at 06:42 PM

Gotcha. Thanks for all of the help. I really appreciate it.

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

so this solution was very helpful, but if I try to shoot say.. the sky it just says trace failed and won't shoot

more ▼

answered Aug 24 '17 at 01:16 AM

avatar image

mabdog
5 1 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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