Hey guys.
I want to make a helicopter which is flying in a Circle around a rock, and a FPS-Camera inside this helicopter.
This works so far, but the problem is that the FPS-Camera rotates itself.
There is a point at the rock, which turns itself. The Camera and the Helicopter are childs from this point.
I hope you guys understand what I mean, because I don't want to confrontate you with my yet untidy code
Thx, Mynithix
By the way, basic C++ problem because I'm a noob.
I have a main.cpp with the game.h(eader). In the header there is a void menu(){} but I've got a second file menu.cpp where void menu(){isFilled();} So, what can I do to use the menu.cpp?
Problem with Moving Child Camera...
Problem with Moving Child Camera...
Two things are infinite: the stupidity of the humans and universe. I'm just not sure if the universe is really infinite!
YOLO
YOLO
Re: Problem with Moving Child Camera...
Couldn't you make the helicopter rotate, instead of the node which the two (helicopter and camera) are children?
Camera and helicopter will follow the node, but only the helicopter will spin...
Camera and helicopter will follow the node, but only the helicopter will spin...
Re: Problem with Moving Child Camera...
You mean - you want to walk around inside the helicopter while it is flying? Pretty tricky and interesting problem :-) And sorry, I haven't tried doing that yet, but could be you have to write your own camera-animator code for that.
About the c++ problem - you can't have 2 implementations of the same function - that is simply impossible. What you can have is a declaration and an implementation. Basically your header has to look like that instead:
That tells the compiler then that there is a menu function which will be implemented somewhere else.
Then again you usually do not that have many simple c-style functions when programming c++. It's more common to put stuff into classes.
About the c++ problem - you can't have 2 implementations of the same function - that is simply impossible. What you can have is a declaration and an implementation. Basically your header has to look like that instead:
Code: Select all
extern void menu();
Then again you usually do not that have many simple c-style functions when programming c++. It's more common to put stuff into classes.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Problem with Moving Child Camera...
Hm, currently I just need to be able to 'turn my head'. Is this as tricky as walking around?
Two things are infinite: the stupidity of the humans and universe. I'm just not sure if the universe is really infinite!
YOLO
YOLO
Re: Problem with Moving Child Camera...
I think you shouldn't use a FPS camera in that case. FPS camera is just for walking around. You can use Maya-camera maybe. Or just a normal camera and then add your own animator to it for rotating around (in short that should update your camera position to the helicopter, and then you have to control the target values of the camera based on input).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm