Movement and Camera question!

Hey, i was messing around with BGE, and i am trying to get a camera set up that works like the camera in this game:

the game is Final Fantasy 7: Crisis Core, and i really love the set up for camera and character movement. now that is for battle, but it is similar for the normal walking around gameplay, except the camera is a little more zoomed in on the character sense there are no enemy around.

anyway anyone know how i can get a good set up similar to this?

Adjust camera zoom based on the number of enemies within a certain distance.

…I assume you know BGE python. If not, you should try to do something a little less challenging than copying a camera system from a multi-million dollar game franchise.

Just a suggestion, of course.

i didnt mean i want that exact camera system, i said i wanted something similar, basically i want it so that when your just walking around, your camera just follows you, and adjusts itself to collisions, which i kinda know how to do. but also so that i can control it with, well in this game its L and R on the PSP, but on the computer it could be left and right arrow keys, anyway, then in battle, it adjusts itself to fit for the battle area which is a set are like in this game, where untill you defeat all enemy, you cant go past a certain perimeter.

and no i do not know python, its not really my thing. but i was hoping maybe a simple python script, or even some logic could get something close to what i want.

well if you dont want to learn python, play around with the “Camera Actuator” in the logic bricks

Yeah, you could set up the camera actuator however you want, add some keyboard sensors for camera movement, and make it so that when the character nears an enemy, it can send a message to the camera telling it to change states. In this changed state, it can follow an empty, parented to the character, instead of the character and then, when the character defeats the enemy, it can send another message to the camera telling it to change back to its original state…

so basically your saying set up a property that is false, and it could be i guess Enemy Appear or something like that, then have it True when they are around, which then changes the camera, and when dead it goes back to false which then changes the camera back to normal?

Basically, yeah… :stuck_out_tongue:
Here’s an actual example:


example.blend (141 KB)

i like how it works, though the controls get really hinky when the camera is moving.

like im hitting forward but he looks like hes going left when the camera rotates to far. any way to fix that?

I would fix it by applying player velocity in reference to the axis vectors of the camera.

I was going to make a demo for you, but you already had one in this thread: It’s time for you to do some work.

how can I do that when i have no idea HOW to do that

If I understood you correctly, you wanted to know how to fix the “hinky” controls; I told you how:

“I would fix it by applying player velocity in reference to the axis vectors of the camera.”

And as to “how” to do that:

Use python to get the relevant axis vectors of the camera (or an object parented to the camera), and then set player velocity along those vectors, to keep the controls consistent regardless of camera orientation.

BGE Python API documentation can be viewed here: Link

ok…so i need python…guess i am gonna go consult my python friend, he knows how to do all that, me, i am not good at coding at all.

like i tried python, not my thing

Less daunting solution: slow parent the camera to the character instead of setting up a camera actuator…
That way the camera will swing around faster and the funky controls will be less so…
A time offset of around 80 works well…

Except now instead of the camera changing states, it’ll have to change cameras when you near an enemy.
The second camera can be aimed and slow parented to the empty the first camera would have originally been following…