I’m new to Urho and I’m trying to creating an FPS game and i was wondering if anyone knows how you make the gun stay pointing towards the center of the screen when you rotate the camera node.
This is what I’m looking to do
if anyone can help it would be greatly appreciated.
Are the model show up if you create it as an independent node ? (child of scene)
Try to create it as a child of the camera but add some small code for moving the gun node with some keys in different directions (WASD perhaps and up down for Y movement.)
BTW i know how iritating this is… i had the same problem when i was making my fps controller. It takes time to adjust the rotation/position/scale offset
My suggestion would be to use the editor - create node with camera component, add gun node as child, set models etc, and then just use handles to find right offset for the gun node. Note: when You select camera component in scene hierarchy, there is a small preview window in right-bottom corner.