Get Character Direction

Blitz3D Forums/Blitz3D Beginners Area/Get Character Direction

Howdy all.
I need to get the direction my character is facing (Vector?) when a user hits wsad keys. The Character moves fine, of course its a sphere for now so I cant tell which way its actually facing.

Heres some code...

        ;Function Init_Models
	Ply.Plyr(0)\Modl = CreateSphere()
	ScaleEntity Ply.Plyr(0)\Modl,.5,.5,.5
	EntityColor Ply.Plyr(0)\Modl,255,0,0

	Ply.Plyr(0)\Piv = CreatePivot()
	EntityRadius Ply.Plyr(0)\Piv,.5,.5
	EntityParent Ply.Plyr(0)\Modl, Ply.Plyr(0)\Piv

        ;Function Move
	If KeyDown(17) Then ;W
	        MoveEntity Ply.Plyr(0)\Piv,0,0,Speed
	EndIf
		
	If KeyDown(31) Then ;S
		MoveEntity Ply.Plyr(0)\Piv,0,0,-Speed
	EndIf
		
	If KeyDown(32) Then ;D
		MoveEntity Ply.Plyr(0)\Piv,Speed,0,0
	EndIf
		
	If KeyDown(30) Then ;A
		MoveEntity Ply.Plyr(0)\Piv,-Speed,0,0
	EndIf




DeltaYaw()

maybe you could use a different object, or use:
entitypitch#(ply.plyr(0)\modl,1),entityyaw#(ply.plyr(0)\modl,1),entityroll#(ply.plyr(0)\modl,1).
Other than that I don't know how to get the rotation of the character, as far as where the character is facing, probably a vector command would work, but I don't know much about those.

I now use objects to point the model at depending on which direction he is facing. I then use a variable to store the direction and send that across the network. Everything works great except the lag :(