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"

Shoot Projectiles at Mouse Pointer in a 3d space

Hi there! Is available any way of shooting projectiles at mouse pointer in a 3d space from an actor blueprint?

Product Version: UE 4.12
Tags:
more ▼

asked Aug 08 '16 at 01:43 PM in Blueprint Scripting

avatar image

Isadora
16 4 3 4

avatar image Plosnita Aug 08 '16 at 02:00 PM

Yes there is. Provide more details. Going from 2D (mouse pointer ) to 3D , requires to add a coordinate (Z) from nothing. So this is something that must result from design.

avatar image Isadora Aug 08 '16 at 10:39 PM

what do you mean by design?

avatar image Isadora Aug 08 '16 at 10:52 PM

I basically have a pawn that can rotate around around following the mouse position and I try to make a projectile leave one of the child actor towards mouse location.

avatar image Isadora Aug 09 '16 at 08:54 AM

Is there a way to make a line trace from camera to mouse cursor and the weapon that i've created to fire there if hits something, if not to fire at the max range?

avatar image NoahTimefireVR Aug 09 '16 at 02:29 PM

You can check to see if the linetrace results in a hit, if it does then execute code to fire at that target, if not tell it to fire at max range. Just use the "return Value" on the end of the line trace node.

avatar image Isadora Aug 10 '16 at 11:52 AM

ok. So I have managed to shoot at target location but it doesn't seem to be accurate..it's like very near from it. I want to mention that the srojectile is fired from a side to that hit location and the trace channel if fired from camera. Any ideeas ?

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

3 answers: sort voted first

All right! After many trials I managed to pull it up. Thanks for your response guys. That gave me a glimps of what I have to do.

more ▼

answered Aug 10 '16 at 12:59 PM

avatar image

Isadora
16 4 3 4

avatar image Isadora Aug 10 '16 at 01:02 PM

alt text

help.png (231.9 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Here is another question I have answered that is the same question:

How to shoot at mouse location.

more ▼

answered Aug 08 '16 at 03:39 PM

avatar image

NoobsDeSroobs
2.5k 98 22 159

avatar image Isadora Aug 08 '16 at 10:48 PM

Well I've tried yours already and as a result the projectile flies only in one direction no matter how I rotate my character or how I change the mouse position

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

Have you tried something along the lines of: alt text

more ▼

answered Aug 08 '16 at 11:15 PM

avatar image

NoahTimefireVR
480 15 7 35

avatar image Isadora Aug 09 '16 at 07:01 AM

Yea unfortunately and as a result the projectile flies backwards, towards me.

avatar image NoahTimefireVR Aug 09 '16 at 02:27 PM

You want it to go the other way? then just switch the start and target of the look at rotation.

(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