lock on?

Hi. Could I ask how to implement the lock on system like that of zelda? Wherein the camera is (kinda) free but it needs to face on the enemy and the character? I think it’s called Z-Targeting on Zelda. Anyone can help?

the camera must see both enemy and player in the same time?

player on the left, the enemy on the right with 45 ° angle?

not necessarily, but yeah. the camera needs to focus on the enemy and at the same time, having the player on screen. anyone knows how to do this?

I think track to should work.
if want cam to see charactor just put empty in charactor and vertex parent empty with charator
parent camera with empty and use empty to track to object you want to lock on camera will look at object.
I think it will work but I’m not sure.

if you want multiple lock on I have an idea but it have to use python.

Maybe you could put an empty between the two (precisely) using Python and have the camera Track To in 3D along with a ‘set parent’ actuator? I’ve never played Zelda so I’m only guessing.
PS, how’s the game coming along? :smiley:

Bankbaa is a minute faster than me…

@RossBlenderArt how would I set up a script like that? That seems a pretty good idea. I know that in the lock on system, you NEED the track to actuator, but I would like the lock on to have some field camera kinda like when locking on in Kingdom Hearts and Zelda.
As for my game. I’m sorry but I haven’t made any progress due to the competitions I’m attending and school. I just decided for the summer(in my country) to start from scratch.

Wait… Track To’s work inside the BGE? I thought the only Constraint that did was Rigid Body. I’ll have to try it out when I get back to a computer.

If not, I think the Camera Actuator will work.


@rking, ‘Track To’ is located in the Logic Bricks under the Actuator ‘Edit Object’. It’s not in the constraint panel.
@fullgrown31, sad to hear you’re restarting your game, can we have a demo maybe? :stuck_out_tongue:
About the problem/solution, I don’t know Python, but I’m 100% sure it’s possible to put an empty between two objects.

Im just thinking now, maybe you could just use motion actuators along with the track to / parent. No one would notice the difference…