Camera as guns parent?
Camera as guns parent?
Hi
Im using Irrlicht 0.7 and Visual Basic .NET, but dont let that scare you.
Any answer, even without code and just logic is welcome.
Im developing a 3D-Shooter game, not original but its ment as a test
project to get to know Irrlicht. Actually im doing pretty good cuz i've overcome a lot of problems because most of the stuff isn't implemented
yet in the .NET version and development is still at 2% the last 2 months
But i've got a question:
I would like to link my 3D Rifle to the camera, just like in any other 3DShooter. So when you walk, it moves along. I've read alot about settings
its parent, and i've even used the gun-placer-tool that i've found on the forum. But I cant get it work...
- When I set the parent of the gun-object to the camera, and run the game it just wont appear... its gone.
- When I set NO parent to the gun it appears at the location I've set it to, just normal.
Maybe this problem is caused because the position of the gun, when the camera is its parent, is out of the viewport... so its "dragging around behind the camera, behind my back ". Is this possible? and if so.. how do I set up the gun to appear as in any other 3D Shooter?
Thanks already!
Im using Irrlicht 0.7 and Visual Basic .NET, but dont let that scare you.
Any answer, even without code and just logic is welcome.
Im developing a 3D-Shooter game, not original but its ment as a test
project to get to know Irrlicht. Actually im doing pretty good cuz i've overcome a lot of problems because most of the stuff isn't implemented
yet in the .NET version and development is still at 2% the last 2 months
But i've got a question:
I would like to link my 3D Rifle to the camera, just like in any other 3DShooter. So when you walk, it moves along. I've read alot about settings
its parent, and i've even used the gun-placer-tool that i've found on the forum. But I cant get it work...
- When I set the parent of the gun-object to the camera, and run the game it just wont appear... its gone.
- When I set NO parent to the gun it appears at the location I've set it to, just normal.
Maybe this problem is caused because the position of the gun, when the camera is its parent, is out of the viewport... so its "dragging around behind the camera, behind my back ". Is this possible? and if so.. how do I set up the gun to appear as in any other 3D Shooter?
Thanks already!
^^^ This post was mine also, sorry forgot to fill in my name
But i've alterd the near-value of the camera to 0.5, and it still doesnt show up.. maybe because my gun is not pointing the right way. But what did happen is a kind of FishEye effect.. so it almost looks like ur watching trough a glass ball you know what I mean?
But i've alterd the near-value of the camera to 0.5, and it still doesnt show up.. maybe because my gun is not pointing the right way. But what did happen is a kind of FishEye effect.. so it almost looks like ur watching trough a glass ball you know what I mean?
Hi Walter!
You can just set the position with setPosition().
If your scene node has a parent, the position is interpreted relatived to parents position and rotation.
If you want some code, check out http://aoh.arturh.com
You can just set the position with setPosition().
If your scene node has a parent, the position is interpreted relatived to parents position and rotation.
If you want some code, check out http://aoh.arturh.com
Arena of Honor: http://aoh.arturh.com
Nope, first of all... i do not have any 'objectName.setPosition' function attached to an object. But i do have a function 'objectName.position.set(Vector3D)' So I've tried everything with it and the 3DS model loaded as an iSceneNode isnt reacting at all. Its 'stuck' to the exact camera position.
Help
Help
Well you have helped a great deal already spintz, so ill just wait for someone else to give it a try... or maybeill just need to wait for version 0.8 since its planned for more than 2 months to have better .NET capability's. Its a shame that niko has to do it all by himself, this way I can understand that the development of .NET capability's for version 0.8 is still at 2%
Current Project: Don Salvatore's Mafia
Genre: 3D Shooter \ RTS
Programming Language: VB .NET
Engine: Irrlicht 11 [.NET Wrapper]
Genre: 3D Shooter \ RTS
Programming Language: VB .NET
Engine: Irrlicht 11 [.NET Wrapper]