Forum rules - please read before posting.

Some Camera Cursor Follow Issues

Two things I'd like to figure out:

  1. If I have the camera set to follow the cursor, I want it to be able to move horizontally to a certain point, and up, but not below the set floor value. I have achieved this, but for some reason, whenever the cursor moves to any of the four corners, it quickly moves in that direction (faster than the set speed), and it allows me to go below that floor line, whereas I cannot do that if I don't move to the corners. Any ideas?

  2. I have gotten my interactive journal working (thanks for the help earlier!), but it would be good if I could turn off the camera following the cursor when this prefab loads. Is there any way to turn off camera follow temporarily without a custom script?

Thanks in advance!

Comments

  • edited May 2019

    it quickly moves in that direction

    As this is a visual issue, I'll need to see some screenshots to illustrate what's going on. Can you provide some that show the problem, as well as the camera's Inspector so that I can attempt a recreation? What are your AC and Unity versions, also?

    Is there any way to turn off camera follow temporarily without a custom script?

    No, but a custom script can be quite simple. To disable mouse influence over the active camera, you can call:

    public void DisableMouseInfluence ()
    {
        CursorInfluenceCamera cursorCamera = KickStarter.mainCamera.attachedCamera as CursorInfluenceCamera;
        if (cursorCamera != null) cursorCamera.followCursor = false;
    }
    
  • I am still very new to using scripts. How would I go about calling said script at a specific point? In my case, the journal action script runs, which ends in it sliding onto the screen (part of a cutscene, so gameplay is paused and the camera is still because of this). At the end, I'd want to turn on this script. How would I go about calling it?

    For the other issue, here is a screenshot of it going below the minimum Y constraint when I've moved the cursor to the lower right corner.

    https://drive.google.com/file/d/1qrcbvETagAAOvhJDMLWxxu_TKOZs6_Pf/view?usp=sharing

  • Oh, I'm also using the latest builds of both AC and Unity.

  • Okay, I was finally able to make this work by working with the ActionTemplate.cs file and tutorial. I am going to try this now with some other things I've been trying. Still need to figure out the camera corner issue, though.

  • The camera Inspector is incomplete. When you say you want to "move horizontally", are you refererring to the camera's target (i.e. the Player), or the cursor?

    I'll need to see this for myself - please PM me your scene file, Player prefab (if you have one) and your game's Managers as a .unitypackage file.

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.