How to find out characters walk direction Author Message
Gian-Reto
Member

 Post: #1 How to find out characters walk direction I try to fiddle around with character movement at the moment... and now I'm stuck with an easy sounding problem: How can I find the direction my character is pointing to? I mean, the direction he walks at the moment. is there any method for that that I could call?
04-09-2012 12:35 PM
aceio76
Silver Supporter

 Post: #2 RE: How to find out characters walk direction Hi Gian-Reto, maybe you can show us what you have tried or done so far in figuring this problem? It really is just a matter of digging deeper into the sample code available. Code snippets will do. www.thinkplaystudios.com
04-09-2012 12:58 PM
JonathonA
Member

 Post: #3 RE: How to find out characters walk direction You have two variables in Game::Chr class, move_dir and Input::move which may provide you with what you need? Failing that look at the matrix assigned to the character or skeleton?
04-09-2012 01:51 PM
Gian-Reto
Member

 Post: #4 RE: How to find out characters walk direction tried move_dir.... its always zero for both x and y direction (z is not available), no matter if the character moves or not. No idea whats its use, but I guess its more used by the "move_to" method... I also tried input_dir.... it only contains non zero values as soon as the character changes direction, so I guess its used to steer. Haven't tried the matrix yet... as I'm not so sure yet what exactly is the use of the matrix. But I'll give it a try...
04-09-2012 02:25 PM
aceio76
Silver Supporter

 Post: #5 RE: How to find out characters walk direction Please look at angle.x and see if that helps. You can do a Angle(matrix().z.xz(), true); on the matrix as well. Please send over your sample code when asking for code assistance. Thanks. www.thinkplaystudios.com
04-09-2012 08:27 PM
 « Next Oldest | Next Newest »