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"

How to get the position front right of a pawn?

I am trying to get the position of a pawn, but in front of and to the left of him. What I am trying to do with the attached code is get the forward direction, rotate 45 degrees left, and then move out a little bit. Instead, this outputs the vector (300, 300, 300). Why isn't what I created doing what I described?alt text

Product Version: UE 4.19
Tags:
helpscreencap.png (126.5 kB)
more ▼

asked Jun 13 '18 at 06:28 PM in Blueprint Scripting

avatar image

sounderdisc
22 3 2 8

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

1 answer: sort voted first

Once you rotate your forward vector by 45 degrees you want to multiply 300 into the result instead of adding 300. Then add the result of that multiplication to the pawn's position.

ForwardVector -> Rotate by 45 degrees -> Multiply by 300 -> Add to Pawn's position

more ▼

answered Jun 13 '18 at 07:02 PM

avatar image

Velrin
360 2 6 7

(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