Jump to content

Leadwerks switching between cameras


martyj
 Share

Recommended Posts

I will be starting to introduce cutscenes in my game. My design idea is to use a secondary camera other than the player's camera, using SetRenderTarget on the secondary camera to tell the game which camera to render to the screen buffer.

 

I was wondering if you call Hide() on a Camera, will it not render?

 

I don't want to render the player's camera and the cutscene Camera at the same time.

 

Thanks,

Marty

Link to comment
Share on other sites

You should be able to put place pivots as markers and move the actual camera between those all. Side note, you might want to look into coroutines for cutscenes. They can give a nice and easy way to manage sequential things like in cutscenes. With a coroutine function you can have code that reads like:

 

MoveToPointAsync(...)

PlaySoundAsync(...)

ShowText(...)

 

etc. for your entire cutscene. Which is much better than managing the state of everything on your own.

 

 

I have a cutscene entity script that handles managing some of this stuff. The coroutinue function is what ends up being in it's own file having it's own function and what gets ran for the cutscene.

  • Upvote 1
Link to comment
Share on other sites

I was planning something similar to coroutines. Basically specifying points for the camera and the time between movements. Then specifying a list of time frames where actions occur and function callbacks to perform operations such as falling rocks, ect.

Link to comment
Share on other sites

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.

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.

 Share

×
×
  • Create New...