I want a weapon to look in the sa´me direction as the camera... but i do not use a FPS-camera... is it possible to get the rotation of the camera?
if not: is it possible to rotate an object first around the x and z axis and then around the y?
i really need help. Is there another way to do this?
rotation problems
Yeah, it's possible to rotate the scene-node that the weapon is on.
Also, you can attach that scene node to the camera's node.
virtual IAnimatedMeshSceneNode* irr::scene::ISceneManager::addAnimatedMeshSceneNode ( IAnimatedMesh * mesh,
ISceneNode * parent = 0,
s32 id = -1,
const core::vector3df & position = core::vector3df(0, 0, 0),
const core::vector3df & rotation = core::vector3df(0, 0, 0),
const core::vector3df & scale = core::vector3df(1.0f, 1.0f, 1.0f)
) [pure virtual]
Specify the parent as the camera when you create it.
Also, you can attach that scene node to the camera's node.
virtual IAnimatedMeshSceneNode* irr::scene::ISceneManager::addAnimatedMeshSceneNode ( IAnimatedMesh * mesh,
ISceneNode * parent = 0,
s32 id = -1,
const core::vector3df & position = core::vector3df(0, 0, 0),
const core::vector3df & rotation = core::vector3df(0, 0, 0),
const core::vector3df & scale = core::vector3df(1.0f, 1.0f, 1.0f)
) [pure virtual]
Specify the parent as the camera when you create it.
Crud, how do I do this again?
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida