Jump to content

Recommended Posts

I'm about to go to bed so I can't do much testing on my own at the moment.

Hey, I'm wondering what you guys think the best way to get stuff to happen while the player is moving only is? I was thinking something with AddStateGraphPostInit, and detecting the run state, but if there's an easier component function I can hook into that I'm missing I would love to know.

I already looked through the Locomotor component, no luck there on something easy, though I could probably hack something together with it IF I REALLY WANTED TO (I do not)

Thank you for the help.

@TheSkylarr

The player entity calls the special locomotor component functions that push the event "locomote" whenever they move around; other entities don't call it, but for your case listening to the event on the player prefab's master post init would be easiest.

Locomotor component also has the variable wantstomoveforward that dictates the intention of the entity to move forwards at its current facing angle, and wantstorun if it's wanting to move fast, for if you want to do more checks somewhere else.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...