Code:
if(action)
{
if(Kb.b(KB_W) || Kb.b(KB_S) || Kb.b(KB_A) || Kb.b(KB_D) || Kb.b(KB_Q) || Kb.b(KB_E))actionBreak();
}
if(!action)
{
// turn & move
input.move.z=(Kb.b(KB_A)-Kb.b(KB_D)) * angle.x;
input.move.y=Kb.b(KB_SPACE)-Kb.b(KB_LSHIFT);
// dodge, crouch, walk, jump
input.crouch= Kb.b (KB_LSHIFT);
input.walk = !Kb.b (KB_LCTRL );
input.jump =(Kb.bp(KB_SPACE ) ? 6 : 0);
// mouse turn
flt max = DegToRad(600)*Time.d();
angle.x += (Kb.b(KB_A)-Kb.b(KB_D)) * max; //Mid(Ms.d().x*1.7, -max, max);
if(angle.x >= DegToRad( 90)) angle.x = DegToRad( 90);
else if(angle.x <= DegToRad(-90)) angle.x = DegToRad(-90);
Vec tempPos = Players[0].pos();
Players[0].pos(tempPos);
}
this code was used in an example by Tottel, when we were going to test it, we found that there is another bug which might be for AMD cpus only, this failed to make the character move on two of my AMD computers .
but the character on my Intel CPU HTPC, and it ran on Tottel's computer and aceio76's computer all Intels.
I tried the standard movement code in Esenthel and it worked perfectly.
using the code above would result in allowing my AMD computer to only turn but not move.
all computers were using Windows 64bit.
movement is ok in EE1.0 C++ but not in EE2.0 EsenthelScript
input.move.z, is getting the correct value as to that it should move, but it doesn't, which makes me think there is an issue with the controller object.