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"

Tracing with Sprites

I'm trying to do tracing with a 2D sprite. problem is the trace always goes to the right of the character no matter what way I am facing.

I guess because its not really a 3d model, so technically he is always facing the same direction, the rest is an illusion?

I managed to solve that problem by using getlast input vector to tell what direction the player last moved hence the direction the player is currently facing. Problem is it wont work when im not moving. I can only do a trace while moving and it moves in the correct direction, but I need to do it stationary. I guess get last input vector returns to 0 when im not moving. Heres the tree i have so faralt text

Product Version: Not Selected
Tags:
trace3.jpg (189.9 kB)
more ▼

asked Feb 11 '15 at 01:49 AM in Blueprint Scripting

avatar image

Lonewolph
5 2 4 4

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

1 answer: sort voted first

if you want to keep using GetLastMovementInputVector, then you should probably grab it in your input events, make sure its non-zero, and save it in a variable. then use that variable here.

more ▼

answered Feb 11 '15 at 02:10 AM

avatar image

Furroy
696 26 86 62

avatar image Lonewolph Feb 11 '15 at 02:13 AM

thats what I was thinking, but I have never used the input events? going to look into this thank you!

avatar image Furroy Feb 11 '15 at 02:16 AM

aah sure you have! InputAxis MoveForward, InputAxis: MoveRight, InputAxis: Turn etc. any of them that could alter the rotation.

avatar image Lonewolph Feb 11 '15 at 02:16 AM

havent tried saving variables or using them yet, trying to figure out how to "grab" it

avatar image Lonewolph Feb 11 '15 at 02:42 AM

not working still, but is this a step in the right direction or way off? :(alt text

trace8.jpg (346.7 kB)
avatar image Lonewolph Feb 11 '15 at 03:03 AM

Got it working. :)

(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