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"

Trigger Matinee animation with specific input only when looking at object

Hi there,

I am playing around with making a simple First Person game (basically to figure out and prototype various gameplay elements). Currently I want a simple way to trigger a matinee animation via a specific key input.

I also want this animation to be triggered only when my crosshair is in line with the object. (I would guess it has something to do with line tracing? Not sure how to correctly implement it though.)

Let's say I want to press LMB to trigger animation and then LMB again to trigger the Reverse of that animation. The animation is simply a opening and closing drawer.

How would I go about doing something like this?

Here's a screen shot of what I have going on so far. This way the two animation are cancelling each other out. Not sure how to isolate the Play and Reverse action and set the condition for opening and closing the drawer:

alt text

Product Version: UE 4.8
Tags:
more ▼

asked Jul 08 '15 at 12:08 PM in Using UE4

avatar image

Agletsio
16 2 8 11

avatar image b16redlined Jul 08 '15 at 09:35 PM

Put a flip/flop after the press event. That makes it a use the same input to trigger the first thing then the second when pressed again.

I haven't actually tried anything with matinee though so, hope it works

avatar image Agletsio Jul 08 '15 at 09:53 PM

OK so got it to work but I have to use a box trigger to limit the animation from only executing when I'm near the object. Ideally I would only want the animation to trigger when the object is in my line of sight (and that line of sight is limited to a certain distance)?

This is how my blueprint looks now:

alt text

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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