MexSource Posted July 10, 2014 Share Posted July 10, 2014 There is already a list with all entities from the world, which you could just iterate over and search for the camera, only to mention that by the way. (world->entities) Quote C++ :3 Link to comment Share on other sites More sharing options...
bandrewk Posted July 11, 2014 Share Posted July 11, 2014 It's even easier, there is a list of cameras: World::cameras the same goes for lights, models, brushes, etc. Quote Link to comment Share on other sites More sharing options...
Vulcan Posted July 11, 2014 Share Posted July 11, 2014 I think you could just place out those cameras in LE editor and then create one camera in code, then just assign position and rotation of camera instead of switching camera. something like this: someCamera.FindCamera("AirportTowerCamera") camera->SetPosition(someCamera.GetPosition()); camera->SetRotation(someCamera.GetRotation()); But don't know how this method would hit the performance. Quote Link to comment Share on other sites More sharing options...
Rick Posted July 11, 2014 Share Posted July 11, 2014 Generally you don't want 2 cameras. Why not just create the camera in code and be done with it? Quote Link to comment Share on other sites More sharing options...
MexSource Posted July 11, 2014 Share Posted July 11, 2014 Yes, I for example create one camera by code and place pivots at the position I need the camera later. Then I set the camera position to the position of the pivot Quote C++ :3 Link to comment Share on other sites More sharing options...
bandrewk Posted July 11, 2014 Share Posted July 11, 2014 Generally you don't want 2 cameras. Why not just create the camera in code and be done with it? I can't see any reason for not having multiple cameras, could you please explain why? Quote Link to comment Share on other sites More sharing options...
Rick Posted July 11, 2014 Share Posted July 11, 2014 There might be situations that cause strange results with multiple cameras all shown at the same time. Like Mex stated above it's probably best to just use pivots as markers for where cameras should be positioned/rotated. You could probably show/hide multiple cameras if you wanted to go that route. I just find it cleaner and reduce any chance for errors by having 1 and just moving it around to markers. Quote 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.