Chiblue Posted March 4, 2010 Share Posted March 4, 2010 I am working on building a 3rd Person Perspective into my project, I also want to have the ability to a overhead "birds view" camera option... So is it best to use a single camera and move it around to were you want it to shoot from, or is it better to run multiple camera and then activate or de-activate the one that is to be used... Oh and by the way, if multiple cameras are the way to go how do I activate a different camera using the same scene? Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Rick Posted March 4, 2010 Share Posted March 4, 2010 I think what people do is use 1 camera. Position it in the top down view each frame, but render what it sees to a different buffer. Then bring it back to the 3rd person. Now you can draw that other buff on the screen. So you'd be rendering the world twice each iteration. Once to the top/down buffer and then the normal on to the gbuffer that gets flipped onto the screen. Quote Link to comment Share on other sites More sharing options...
Chiblue Posted March 4, 2010 Author Share Posted March 4, 2010 I tried that but my FPS drops from 300+ to 20-... Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Masterxilo Posted March 5, 2010 Share Posted March 5, 2010 You can use two cameras. Just make sure only one is visible when you render the scene (hide the other one with HideEnitity(), show with ShowEntity()). Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Rick Posted March 5, 2010 Share Posted March 5, 2010 I tried that but my FPS drops from 300+ to 20-... Is the code small enough that you could show us. I wouldn't think it would matter to use 1 or 2 cameras though. I did something like this for a player HUD. Where I would place the camera directly in front of the player, place an inverted cube around the player and camera to give a black background, then render that to a buffer and draw it screen using DrawImage(). It would when snap back to where it was. I didn't notice any drop in FPS with that. Quote Link to comment Share on other sites More sharing options...
Chiblue Posted March 5, 2010 Author Share Posted March 5, 2010 I am not sure if the drop in fps was due to single camera or not, I did get the 1st and 3rd person working with 1 camera which did involve lots of show and hide entr entity for the different objects, I will look at this again today and if I still have issues will post the code. Thanks for the show hide entity for cameras that is helpfull... Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.