I've an odd Problem.I tried to put some
movement to my objects , code :
Code: Select all
if (event.EventType == irr::EET_KEY_INPUT_EVENT)
{
vector3df v = ply.Pnode->getPosition();
switch(event.KeyInput.Key)
{
case KEY_KEY_W:
{
v.Y += 2.0f;
ply.Pnode->setPosition(v);
}
case KEY_KEY_S:
{
v.Y -= 2.0f;
ply.Pnode->setPosition(v);
}
case KEY_KEY_D:
{
v.X -= 2.0f;
ply.Pnode->setPosition(v);
}
case KEY_KEY_A:
{
v.X += 2.0f;
ply.Pnode->setPosition(v);
}
}
}
}
when I compile my project.
Does anyone have an idea?