Announcement

Collapse
No announcement yet.

Getting Player Speed?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Getting Player Speed?

    So, in a nutshell, I need to add some post-process FX as the player runs. Currently, I have a sprint mechanic driven by a timeline in order to blend into a sprint as the SHIFT key is pushed, rather than jumping right into it. I've tried a few different methods, all of which sort-of work. The problem is--because of the timeline, I suspect--whenever the shift key is down, the post process FX kick in. And even then they aren't consistent during the sprinting, popping on and off, etc.

    Basically, I figured the best solution would be to get the player's speed, and if it's greater than the walk speed (or equal to the running speed) I would have the PP effects blend in. The problem is I can't seem to get it to work. I've tried GetForwardVector, GetVelocity, all to no avail. Essentially, I'm trying to intensify motion blur and some other effects during a sprint. I don't need anyone to go out of their way and give me an entire BluePrint, just some suggestions on what may work.

    Thanks guys.

    #2
    Getting Speed for player

    Originally posted by mws87 View Post
    So, in a nutshell, I need to add some post-process FX as the player runs. Currently, I have a sprint mechanic driven by a timeline in order to blend into a sprint as the SHIFT key is pushed, rather than jumping right into it. I've tried a few different methods, all of which sort-of work. The problem is--because of the timeline, I suspect--whenever the shift key is down, the post process FX kick in. And even then they aren't consistent during the sprinting, popping on and off, etc.

    Basically, I figured the best solution would be to get the player's speed, and if it's greater than the walk speed (or equal to the running speed) I would have the PP effects blend in. The problem is I can't seem to get it to work. I've tried GetForwardVector, GetVelocity, all to no avail. Essentially, I'm trying to intensify motion blur and some other effects during a sprint. I don't need anyone to go out of their way and give me an entire BluePrint, just some suggestions on what may work.

    Thanks guys.
    Get Velocity Vector Length = speed

    Attached Files
    Last edited by JayWebb; 09-17-2016, 07:17 PM.

    Comment


      #3
      Strange its not working for me

      Velocity is at 0 until i add a force to the actor, then it go back to 0 but the actor still moving
      Last edited by Samuel Brunner; 05-13-2019, 09:59 AM.

      Comment


        #4
        Get a reference to the character movement component, drag off from that and get velocity (it's different from the standard component velocity).

        Comment

        Working...
        X