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"

Align Crosshair With Arrow Component

I'm currently working on setting up a bow and arrow function and unfortunately the bow is getting in the way of the crosshair. I'm wondering if there is a way to, when aiming the bow, align the crosshair with the arrow set up in the weapon blueprint?

Unfortunately the crosshair is set to the center of the screen (always active). I'm just not sure if it's possible to move it several measurements to the left when aiming the bow.

Thanks!

Product Version: UE 4.18
Tags:
more ▼

asked Mar 25 '18 at 02:59 AM in Blueprint Scripting

avatar image

four2nothin
19 4 7 16

avatar image Nebula Games Inc Mar 26 '18 at 01:09 PM

I know there is a way you can do this, probably a few ways to go about it. I have not done it though but some brainstorming ideas that might help, if maybe you have an additional camera that is slightly offset from the straight on view you normally use and you switch the view to this offset camera during aiming that might fix the issue, you also might want to look into only bringing up the crosshairs during the aim mechanic and then script it in a way that it is always X amount of degrees offset from the bow.

avatar image four2nothin Mar 26 '18 at 03:42 PM

Hey, if you'd kindly copy and paste your reply as an answer I'd like to mark it! I found a solution in your answer! :) Thank you kindly!

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

3 answers: sort voted first

Thanks to Nebula Games Inc, what I did to resolve this is add another camera to the player that is only active when the aim button is pressed.alt text

bow-cam.png (98.7 kB)
more ▼

answered Mar 27 '18 at 03:36 AM

avatar image

four2nothin
19 4 7 16

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

Usually you can just give the camera an offset. Thats the only way. Imagine a space ship that has several weapons. All weapons are adjusted forward, but the camera behind the ship has an offset. Also imagine a character who holds 2 weapons. Same case. Imagine forward lines. They will all meet in the center somewhere in the distance. there is no more to consider :)

more ▼

answered Mar 25 '18 at 04:44 PM

avatar image

Raidfire.Net
672 62 57 118

avatar image four2nothin Mar 25 '18 at 06:17 PM

Hm, so I would do this when calling the function for aiming right? How would I offset the camera during this function?

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

I have created a tutorial for this.

the hardest part of this for me was aligning the cross hair and the bow aiming direction of the character. For this I had to use rotate the character from a bone using Transform modify bone node in animation blueprint on top of the animations. Here you can see the process I have followed. https://youtu.be/b63yaqZ8Psk![alt text][1]

alt text

hqdefault-10.jpg (35.0 kB)
more ▼

answered Aug 01 '19 at 01:05 PM

avatar image

Thilina_arimac
41 4 2

(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