Hi,
My name is Constantin, a 20 year old Game Designer (currently working in the field for a Mobile Game Dev company), who happened to run into Esenthel not long ago! In the past I've been using another SDK (DarkGDK) for my game dev experiments (been coding for 5 years actually), but I never got passed to using any other SDK/Engine, so I'm kinda stuck with coding the GDK Way. Anyway, I picked up some bad coding habits in the past, that still hunt me to this day, and I'm running into some problems when it comes to working with Esenthel.
Recently, I played with the idea of working on a 3D Side Scrolling, story driven game. I read some of the Tutorials that come with Esenthel, and tried to adapt the Character tutorial to my needs. I've got the camera to follow the player's position, while keeping it stuck on a 90' angle, and changed the movement code to allow moving left/right with D and A, but I'm stuck at moving the player on the Z axis (moving the player in depth). What I want to do is the following:
[pseudo code]
if W_Key is pressed then
rotate the player 90'
move player on that direction
end;
[/pseudo]
But if I temper with with input.turn.x/y and then press the W, the Player Actor kind moves in circles.
Here's an example of my code:
Code:
if(Kb.b(KB_D)) //Move forward with D
{
input.move.z = 1;
}
else if(Kb.b(KB_A)) //Move backwrd with S
{
input.move.z = -1;
}
else
{
input.move.z = 0;
}
if(Kb.b(KB_W)) // Move in Depth with W
{
input.move.x = -1;
}
else if (Kb.b(KB_S)) // Move in -Depth with S
{
input.move.x = 1;
}
else
{
input.move.x = 0;
}
Anyway, I guess that I'm used to the old way of turning and moving an object, and I'm trying to do the following:
[pseudocode]
if W_Key is pressed
RotateObject(90')
myObject.SetPositionZ(myObject.GetPositionZ()+1)
end;
[/end of pseudocode]
Thing is, I'm trying to rotate the object, and reset it's position to the direction it is facing. Sorry if my way of explaining it is a little wierd. If it's not that understandable, I will make a small example using GDK on what I want to accomplish.
Thank you for your time,
Zapa