1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Made wielded tool move slightly (and smoothly) during view bobbing. Making the tool be a child node of an empty scene node instead of the camera scene node seemingly fixed the uncontrollable tool jitter, too.

This commit is contained in:
Kahrl 2011-09-15 00:32:11 +02:00
parent fc92da4324
commit 63266928a5
3 changed files with 43 additions and 17 deletions

View file

@ -813,16 +813,8 @@ void the_game(
Create the camera node
*/
Camera camera(smgr, draw_control);
if (camera.getPlayerNode() == NULL)
{
error_message = L"Failed to create the player node";
if (!camera.successfullyCreated(error_message))
return;
}
if (camera.getCameraNode() == NULL)
{
error_message = L"Failed to create the camera node";
return;
}
f32 camera_yaw = 0; // "right/left"
f32 camera_pitch = 0; // "up/down"
@ -856,7 +848,7 @@ void the_game(
mesh->addMeshBuffer(buf);
buf->drop();
tool_wield = smgr->addMeshSceneNode(mesh, camera.getCameraNode());
tool_wield = smgr->addMeshSceneNode(mesh, camera.getHeadNode());
mesh->drop();
}
tool_wield->setVisible(false);