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"

Air Hockey Game mallet controlled by mouse movement

Hello Everyone!

I am trying to make an Air Hockey game and am having a difficult time with blueprints.

What I am trying to do is have the mallet attached to mouse movement. So far when I try the attached blueprint set up the mallet disappears. I can see that the mouse location is being updated but for the life of me I can't figure out why the mallet doesn't show up.

I used this post a reference. https://forums.unrealengine.com/showthread.php?30195-Whiteboard-Blueprint

Any help would be great.

Thank you!

alt text

alt text

Product Version: Not Selected
capture111.jpg (217.8 kB)
asdfefaf.jpg (472.5 kB)
more ▼

asked Sep 05 '14 at 01:34 AM in Blueprint Scripting

avatar image

3 1 2 4

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

1 answer: sort voted first

Hi Maj,

There's two issues I see with your blueprint code.

  • First, the "World Direction" value from "Convert Mouse Location" node is a vector with angular data with values less than 1. So, what you want to do instead, to determine the end point of your trace, is to multiply the direction by an arbitrary value (the length of the ray trace you want - I used 800 units in the image below) and add that value to your starting position:

alt text

  • Second, is that you should only set the actor's location if the trace was successful. This can be accomplished by adding a branch from the return value on the trace:

alt text

more ▼

answered Sep 05 '14 at 02:54 AM

avatar image

226 7 10 15

avatar image maj86 Sep 05 '14 at 03:04 AM

AWESOME! Thank you schmit! Now I just need to figure out how to keep the mallet on the table, set the movement area and limit the movement speed. This has been bothering me for days!

(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