Forum rules - please read before posting.

Teleport Camera whilst still having Follow Cursor functionality

I'm using Hotspot clicks to move a NavCam around a 2D project. I'd like to still have the Follow Cursor tickbox checked, but enabling the Game Camera 2D script on the camera stops the Teleport Action from working.

I assume I need to remove or change a line of code to stop blocking this. Thanks and please advise how to proceed.

Comments

  • You can't teleport a GameCamera directly - it's position is controlled internally, so there'll be a conflict if you try to move it externally.

    Instead, parent the camera to an empty GameObject, and teleport the parent.

  • Thanks, that works, but only if I untick Game Camera 2D (script) and but still tick Follow cursor?.

    Works for me, but not sure if it should.

  • It may be projection-related. Are you using Orthographic or Perspective projection?

  • I'm now having *issues Crossfading from this camera (NavCam1) to another (NavCam2), then teleporting NavCam1 (within a game object) and crossfading back to it. I think its because theres a conflict with this Game Camera 2D (script) and teleporting. How can I have the Follow Cursor functionality without the Game Camera 2D (script) causing conflicts?

  • It will require an internal resetting of the camera's position.

    I shall look into this as part of the upcoming v1.72.0 update.

  • Ok great. I'll push on without it for now and then hopefully add it in with the next update. Thanks!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.