Hi all,
Please help me. I want my character auto moving on terrain, but I don't know the way to do this. Please help me or give me an example to do this.
Thanks for reading.
Big Bear.
How to moving on terrain
What do you mean by auto moving?
If you want it like a scroller their are numerous ways to do this, for a newbie I would just set a invisible object at X corrids with low gravity drawing your player node to it. Then player_node->getPosition in the while loop and if player_node .X position >= to where the invisble scene node is end the game or.. stop the gravity.
For a scroller it would be stop the game..
If you want it like a scroller their are numerous ways to do this, for a newbie I would just set a invisible object at X corrids with low gravity drawing your player node to it. Then player_node->getPosition in the while loop and if player_node .X position >= to where the invisble scene node is end the game or.. stop the gravity.
For a scroller it would be stop the game..
Programming Blog: http://www.uberwolf.com
Or an easier way would be to set the players direction and rotation and within the while loop do this
while (device->run())
{
vector3df playerforward = player_node->getPosition();
playerforward.X += 1;
}
And if that doesn't work I am not to sure of my code then..
while (device->run())
{
vector3df playerforward = player_node->getPosition();
playerforward.X = playerforward.X + 1;
}
while (device->run())
{
vector3df playerforward = player_node->getPosition();
playerforward.X += 1;
}
And if that doesn't work I am not to sure of my code then..
while (device->run())
{
vector3df playerforward = player_node->getPosition();
playerforward.X = playerforward.X + 1;
}
Programming Blog: http://www.uberwolf.com