• Touch Camera
  • Focus on object while maintaining same distance from the camera

Hi, I am using Free Camera and trying to focus on the object by attaching collider and using focus
through OnSelected(TouchSelect select) from FocusOnClick.cs . When focusing camera always moves to a certain distance from the object which seems to be controlled by "Focus Radius Multiplier" or "Focus Distance Multiplier". I would like to make so that when I focus on the object camera ideally stays at the same distance that we were or as close to this distance as possible instead of always moving too the same distance from the object. Would you be able to point me how to do that?

On the off-topic what does "Allow Yoffset" meant to do?
Thanks!

    Janna Sorry for the late reply, I'm on vacation from today.
    the "focus" methods are actually meant to zoom on a object, so removing the zoom would not make sense, but you could you any other methods like:
    FocusCamera(Vector3 targetPosition, float targetDistance, Quaternion targetRotation, bool instant = false);
    FocusCamera(Vector3 targetPosition, bool instant = false);
    MoveCameraTo(Vector3 targetPosition, Quaternion targetRotation);

    etc

    Thank yeah I see what you mean, if object is very far I do want to focus and zoom but if object is close enough I don't camera to move closer or further, so I think I will have to implement a bit of extra logic using the functions you suggested, thanks!

    Actually what I want to happen ideally is to be able to zoom in and out of object without losing the focus (we have another thread discussing it) but I have not worked out acceptable solution yet (See our discussion in the OrbitDemo thread), so this is my intermediate solution right now

      Write a Reply...