CryEngine 5.4 - How to create orbit camera with C++

I tried to figure out a way to switch from the current third person camera (with aiming style) to orbit style.
First, I tried to remove the aiming style by comment out these 2 lines: this and this
So now I can turn the camera without turning the character. But I wonder if the class CCameraComponent has orbit implement in it (it should orbit the parent entity). I found an article that implemented orbit camera for CryEngine 5.2, if the class CCameraComponent hasn't implemented orbit, I guess I'll have to use this.
Small tips
How to add an image to a forum post
[C++] How to smoothly turn your character

Re: CryEngine 5.4 - How to create orbit camera with C++

You might also want to take a look at the Action RPG camera I have made for my project. It's an orbit camera which can freely rotate around the player / character, regardless of their movement direction.

It's got a bunch of nice enhancements too, like variations on how the tilt works, zooming in and out using the middle mouse button, variable zoom range steps, simple collision detection, cvars all set up to work with it, etc.

It's obviously a bit more complex than the other examples, so maybe look at them first and then see what a fully fledged implementation might look like. It's made to use with a camera manager, and can switch to a first person view if set up with that manager.

Who is online

Users browsing this forum: No registered users and 0 guests