I'm trying to figure out how to scale bodies created in Newton to fit these created in IrrLicht.
I found useful tutorial where I found such code:
- Code: Select all
dVector floorSize(100.0f,2.0f,100.0f,1.0f);
dMatrix floorLocation(GetIdentityMatrix());
floorLocation.m_posit.m_y = -5.0f;
vector3df position (floorLocation.m_posit.m_x, floorLocation.m_posit.m_y, floorLocation.m_posit.m_z);
position*=NEWTONTOIRR;
float irrSize = floorSize.m_x*NEWTONTOIRR;
floor = sceneManager->addCubeSceneNode(irrSize, 0, -1, position, vector3df(0,0,0), vector3df(1.0, 2.0/100.0, 1.0));
so
- Code: Select all
dVector floorSize(100.0f,2.0f,100.0f,1.0f);
- Code: Select all
floor = sceneManager->addCubeSceneNode(irrSize, 0, -1, position, vector3df(0,0,0), vector3df(1.0, 2.0/100.0, 1.0));
But such floor is a bit to small for me. I wanted to enlarge it by simply multiplying numbers by 10. So I get:
- Code: Select all
dVector floorSize([b]1000.0f[/b],[b]20.0f[/b],[b]1000.0f[/b],1.0f);
and
- Code: Select all
floor = sceneManager->addCubeSceneNode(irrSize, 0, -1, position, vector3df(0,0,0), vector3df([b]10.0[/b], [b]20.0/[/b]100.0, [b]10.0[/b]));
And here's my problem. I drop a sphere on this floor, but it sinks to the half of the sphere. When I try different multipliers the ball sinks anyway.
What is wrong, if I didn't provide enough data, I can post more, but I don't know where is problem here.