You can download demo on my page:
http://members.lycos.co.uk/arras1
I was spliting download so you dont need to download Irrlicht.dll and d3dx8d.dll if you have them. Just copy them to demo directory.
There are only few features implemented untill now including one active, player controled object, static camera, skysphere and some dynamic lights.
You can control ship via
a-d w-s q-e keys for movement
1-2-3...-9 for speed
SPACE for stop
I have few questions you can help me with:
1. hove to change text font/size/colour?
2. is there limit in placing dynamic lights?
3. is there function to normalize matrix4?
4. for free flight movement I use matrix4 class to get proper movement of ship. However I got problem with matrix4::setRotationDegrees(...), matrix4::getRotationDegrees() and node->setRotation(...) functions.
In certain situations ship don't rotate corectly. here is code:
Code: Select all
void playerObject::rotate(vector3df rp) //rp is angle to turn, pitch or roll
{
vector3df r = node->getRotation(); //get current rotation (euler)
matrix4 m;
matrix4 mp;
m.setRotationDegrees(r); //set matrix to current rotation
mp.setRotationDegrees(rp); //set second matrix to rotation to add
m *= mp; //multipy them
r = m.getRotationDegrees(); //get rotation vector from matrix (euler)
node->setRotation(r); //rotate node
}
When Y rotation of node (player object) is 0 or 180 pitch and roll don't work corectly. I made small workaround to prevent this but its not realy solution:
Code: Select all
if(r.Y == 0.0f)
r.Y = 0.001f;
if(r.Y == 180.0f)
r.Y = 180.001f;
.