Wonderlarr Posted November 10, 2021 Share Posted November 10, 2021 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. Link to comment https://forums.kleientertainment.com/forums/topic/135189-most-efficient-way-to-detect-player-movement/ Share on other sites More sharing options...
CarlZalph Posted November 10, 2021 Share Posted November 10, 2021 @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. 1 Link to comment https://forums.kleientertainment.com/forums/topic/135189-most-efficient-way-to-detect-player-movement/#findComment-1512061 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now