getting player forward speed without CMoveData.GetForwardSpeed?

read the title. a detailed explanation is mostly unnecessary.

Assuming they’re moving in a straight line, you could just use ply:GetVelocity() or determine their speed based on their position.

cool i didn’t know this was “newbie questions with newbie answers”

Hey man, I’m just trying to help. No need to be all snippy.

That was my way of saying there’s possibilities but there’s no real way that I know of.
Also, instead of insulting me, please tell me why exactly those are invalid solutions.

He gave you the answer. Don’t be such a dick about it.

no he didn’t.

getvelocity doesn’t really tell you if a player is moving forwards… hmm

Velocity --> Vector value —> Has a direction and force —> You can figure out if they are walking forward by comparing eye angles to the direction of the force.

i tried something along the lines of that (before i even made the thread) but i did it in a incredibly retarded way that didn’t work. i’ll try again with something else i have in mind. also thanks for a potentially useful post.

( curpos - lastpos ):GetNormal( ):Dot( forward ) <= tolerance?

i’ll try it out. if i can get something based on the player’s GetVelocity and EyeAngles that’d be nice.

  1. I assumed that when you yelled at Entoros for suggesting Player.GetVelocity that you didn’t want to use the function.

  2. EyeAngles( ):Forward( ) should work with that. I just used forward as whatever you wanted to use as the actual forward.

Also, might to wrap that in a call to math.abs.

figured it out by ripping code from a rambo_6 gamemode
[lua] local vel = LocalPlayer():GetVelocity()
local ang = LocalPlayer():EyeAngles()