I’ve just finished a tutorial on how to develop “a 1st person camera system with Panda3D and c++” and would like to show it to you.
You can find the download link in the manual section: “User Contributed Tutorials and Examples”
This thread is for you to comment on my work, once you have read it. Also, you are welcome to post any mistakes you may find, so I can correct them
[size=134]
[color=red]!!!Please no spam!!![/size]
No! I wanted to write something for C++, because, in contrary to python, there are no tutorials for it.
Every sample or tutorial uses python code. SO it shouldn’t be you asking but me: “Anything for C++ ”
100 downloads!
Thank you for that, but I would really like to get some feedback.
So, if you have read (or will read) the tutorial, I would like you very much to tell me your opinion.
As an alternative to this thread (e.g. if you don’t want to register only for giving me some feedback) you can also write me an e-mail to encytechsupport@googlemail.com
No idea how I could have missed that. (Thanks for bumping)
This paper is the first really extensive, detailed, hi-quality topic-related paper I’ve ever seen in connection with Panda3D.
The fact that it covers a very incomplete section of the documentation, C++, makes it even more valuable and from the first view I can say that it’ll be helpful for me as Pyton coder no less.
Nice information from you. I have seen this link, and Its working so wonderful and nice result too. Thank you for sharing this wonderful page. This is so interesting! .and your information is really increase my knowledge. I hope you send more information like this.
But the cursor doesn’t stay in the center of the screen and the image rotates really fast, even though the x_size and y_size are correct. Any idea why?
Also, how can I get rid of the set_size(1440,900) line? Without it the application runs in fullscreen, but with a different resolution and with black vertical margins.
And last, but not least, do you know a way to replace the mouse cursor with a crosshair/target?
As to your problem: I wrote the tutorial more than two years ago, and I haven’t touched Panda in quite a while, because I’ve been working on a project that uses Ogre. That having been said, my (for the reasons I just mentioned rather amateurish) guess is that perhaps win->get_graphics_window()->get_x_size() doesn’t work in fullscreen (or maybe it’s outdated?). Try putting something like this at the top of the listing:
/*
* In CamRotationTask:
*/
//Subtract half the window size to retrieve
//the relative cursor movement
cursorX -= SCREEN_W_HALF;
cursorY -= SCREEN_H_HALF;
//[...]
//Reset the cursor to its default position (middle of the window) win->get_graphics_window()->move_pointer(0, SCREEN_W_HALF, SCREEN_H_HALF);
/*
* In main
*/
wpx.set_size(SCREEN_W, SCREEN_H);
Now this may or may not solve your problem, but, anyways, it’s good programming practice
If you want to change your cursor, I think you can simply add this line to your config.prc file:
cursor-filename your_cursor.ico
Alternatively, you could try the following in your main function: