attach mesh to a camera

Problems building or running the engine, queries about how to use features etc.
Post Reply
rex
Gnoblar
Posts: 3
Joined: Sun Feb 27, 2005 1:16 am

attach mesh to a camera

Post by rex »

Hi everyone

I am having trouble figuring out how to attach a mesh (a wepon in this case) to a camera. I can load and display the mesh allright i just can't get it to move with the camera.

sorry i know this would have been asked many times before but i searched the forums and couldn't really find an answer on it.

Thanks
AssiDragon
Greenskin
Posts: 145
Joined: Wed Apr 28, 2004 12:10 pm
Location: Hungary
Contact:

Post by AssiDragon »

Just make a scenenode, and attach both the camera and the mesh to it. :) Then you can apply the mesh's rotation and distance from the camera, as you don't want it to appear right in the middle of the viewport I guess...
Hope is the first step on the road to disappointment.
rex
Gnoblar
Posts: 3
Joined: Sun Feb 27, 2005 1:16 am

Post by rex »

o ok i figured it out, cheers :D
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

That's the generic way. For your purpose, you can add that mesh as a 3D overlay (I don't know if that feature still works on Azathoth) ;)
User avatar
charlie
Greenskin
Posts: 146
Joined: Mon Nov 15, 2004 1:43 pm
Location: Austria
Contact:

Post by charlie »

When I came up to this problem months ago I used AssiDragon approch. It worked really great for me.
Post Reply