Jump to content
Sign in to follow this  
Igor Q.

Camera "Lock On"

Recommended Posts

I was looking to create a camera using a "lock on" mechanic similiar to many video games such as Zelda or other rpg style games.

 

However I've run into an issue, it doesn't properly track the players movement.

When running I get the camera to be "above" the player, but I can't make it permenantly stay behind the character relative to aim.

(Please disregard the offset on NPC by -200 units)

image.thumb.png.96ab117b7e5bf7474d27ff51d81371c8.png

Here I set Z Off-Set to -2 to be behind the character, but when I try running "sideways", the camera gets shifted out of focus.

 

image.thumb.png.371ea66cd95e8addbd974947b6694c4a.png

How can I fix this?

 

 

Edited by Igor Q.
  • Upvote 2

Share this post


Link to post
Share on other sites

Hello Igor,

I've looked into it and came to the same conclusion as you. Which is, it seems to be impossible to achieve that sort of camera by using just the settings of the Custom Camera. 

You can, however, animate an object (reference point in my example) to the desired camera position and get the same effect.

DS CAMERA.zip

  • Like 1
  • Upvote 1

Share this post


Link to post
Share on other sites
2 hours ago, pypse said:

Hello Igor,

I've looked into it and came to the same conclusion as you. Which is, it seems to be impossible to achieve that sort of camera by using just the settings of the Custom Camera. 

You can, however, animate an object (reference point in my example) to the desired camera position and get the same effect.

DS CAMERA.zip

Perfect.

I never knew about the event listener "On Fixed Update". I tried using a loop using time triggers and the screen kept flickering.

But really this begs a question,

 

1) Should "On Fixed Update" even be an event listener? It almost functions like a Time Trigger.

2) Should Camera offset when looking at a target have the offset relative to the view?

Share this post


Link to post
Share on other sites

I can't really comment on the number 1 as this was designed way before my time in the company (and I suppose it is so for a good reason), but I agree with point 2 - there should be options in the game logic itself that would allow this functionality.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×