Jump to content
Azure_Zero

Set camera to a camera in the scene/level/map

Recommended Posts

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)

Share this post


Link to post

It's even easier, there is a list of cameras:

 

World::cameras

 

the same goes for lights, models, brushes, etc.

Share this post


Link to post

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.

Share this post


Link to post

Generally you don't want 2 cameras. Why not just create the camera in code and be done with it?

Share this post


Link to post

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

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...