Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

[BUG-9719] [Feature Request] - CAMERA_RESET parameter for llSetCameraParams() or a function, llResetCamera(). #17188

Open
1 task
sl-service-account opened this issue Jul 21, 2015 · 5 comments

Comments

@sl-service-account
Copy link

sl-service-account commented Jul 21, 2015

Information

We currently do not have a scripted means of resetting an agent's camera. We currently have to either use movement controls or Escape first.
Please consider a CAMERA_RESET parameter for llSetCameraParams() or a function, llResetCamera().

This will alleviate a major headache with many scripted camera apps that currently have to remind people to manually reset their cameras so the app can begin moving their camera correctly.

Thanks in advance.

Related to SCR-330 which is old and was never acknowledged.

Links

Related

Original Jira Fields
Field Value
Issue BUG-9719
Summary [Feature Request] - CAMERA_RESET parameter for llSetCameraParams() or a function, llResetCamera().
Type New Feature Request
Priority Unset
Status Accepted
Resolution Accepted
Reporter Lucia Nightfire (lucia.nightfire)
Created at 2015-07-21T00:32:59Z
Updated at 2021-07-26T21:16:19Z
{
  'Business Unit': ['Platform'],
  'Date of First Response': '2015-08-19T13:41:52.630-0500',
  'How would you like the feature to work?': "h1. Information\r\n\r\nWe currently do not have a scripted means of resetting an agent's camera. We currently have to either use movement controls or Escape.\r\nPlease consider a CAMERA_RESET parameter for llSetCameraParams() or a function, llResetCamera().\r\n\r\nThis alleviate a major headache with many scripted apps that currently have to remind people to manually reset their cameras to get the app to work correctly.\r\n\r\nThanks.\r\n\r\nRelated to SCR-330 which is old and was never acknowledged.",
  'Severity': 'Unset',
  'Target Viewer Version': 'viewer-development',
  'Why is this feature important to you? How would it benefit the community?': '?',
}
@sl-service-account
Copy link
Author

Oz Linden commented at 2015-08-19T18:41:53Z

Please clarify what you mean by reset. An example of a sequence of user interactions and camera behaviors would be very helpful

@sl-service-account
Copy link
Author

Lucia Nightfire commented at 2015-08-19T18:55:10Z

As mentioned in the description, users currently have to either use movement controls or Esc to "reset" their camera, thus making it focus on and follow the owner.

"Resetting your camera." is an practice users of secondlife have been using for years now.

@sl-service-account
Copy link
Author

Whirly Fizzle commented at 2015-08-19T23:44:54Z

Neither of these scripts will work unless the camera view was reset before using them:

Example 1 - llSetCameraEyeOffset and sitting

  • Rez a box & add the following script:
default
{
    state_entry()
    {
        llSitTarget(<0, 0, 1>, ZERO_ROTATION);
        llSetCameraEyeOffset(<0, 0, 2>);
        llSay(0, "Please sit down");
    }
}
  • Hit ESC key to reset cam to default.

  • Sit on the box

  • Observe camera moves to point directly down on your avatar as expected.

  • Stand up

  • Rotate camera so it is facing your avatar.

  • Sit on the box

  • Observe camera view does not move and does not point down ontop of your avatar as expected.

  • While still sitting, hit ESC.

  • Observe camera view now correctly points down on your avatar.

  • Expected: Camera view should point down on your avatar without having to hit ESC key 1st.

Example 2 - llSetCameraParams in attachment

  • Rez a box & add the following script
    {code}
    key id;
    default
    {
    attach(key id)
    {
    if (id == NULL_KEY)
    {
    if (llGetPermissions() & PERMISSION_CONTROL_CAMERA)llClearCameraParams();
    }
    else
    {
    llRequestPermissions(id, PERMISSION_CONTROL_CAMERA);
    }
    }
    run_time_permissions(integer perm)
    {
    if (perm & PERMISSION_CONTROL_CAMERA)
    {
    llSetCameraParams([

      CAMERA_ACTIVE, 1, // 1 is active, 0 is inactive
      CAMERA_BEHINDNESS_ANGLE, 180.0, // (0 to 180) degrees
      CAMERA_BEHINDNESS_LAG, 0.5, // (0 to 3) seconds
      CAMERA_DISTANCE, 10.0, // ( 0.5 to 10) meters
      //CAMERA_FOCUS, <0,0,5>, // region relative position
      CAMERA_FOCUS_LAG, 0.05 , // (0 to 3) seconds
      CAMERA_FOCUS_LOCKED, FALSE, // (TRUE or FALSE)
      CAMERA_FOCUS_THRESHOLD, 0.0, // (0 to 4) meters
      CAMERA_PITCH, 80.0, // (-45 to 80) degrees
      //CAMERA_POSITION, <0,0,0>, // region relative position
      CAMERA_POSITION_LAG, 0.0, // (0 to 3) seconds
      CAMERA_POSITION_LOCKED, FALSE, // (TRUE or FALSE)
      CAMERA_POSITION_THRESHOLD, 0.0, // (0 to 4) meters
      CAMERA_FOCUS_OFFSET, <0,0,0> // <-10,-10,-10> to <10,10,10> meters
    
       ]);
      }
    

    }
    }
    {code}

  • Take box into inventory.

  • Pres ESC to reset camera

  • Attach the box to your avatar.

  • Observe camera view points down ontop of your avatar as expected.

  • Take off the box.

  • Rotate camera so it is facing your avatar.

  • Attach the box.

  • Observed: Camera view does not change.

  • Expected : Camera view should point straight down onto your avatar.

  • Hit ESC key and observe camera is then in the correct position looking down on your avatar.

If Lucia's request was implemented, the scripts would reset the camera without the user having to use the ESC key first.

@sl-service-account
Copy link
Author

Lucia Nightfire commented at 2015-08-20T00:20:17Z

Aside from making applications work correctly without user intervention, it will also prevent people from cheating in Experience based games such as Paleo Quest, Amazon River, Linden Realms, The Cornfield and many others where all you need to do alt cam all over the region or adjacent region to find your objectives or objects of interest. Amazon River attempts to combat this by annoying the player via chat to not move their camera far away from their actual agent's position which you wouldn't be able to do in real life. If this feature was implemented, the camera can be kept in the controlled state game designers intended.

@sl-service-account
Copy link
Author

Oz Linden commented at 2015-09-02T19:02:33Z

Thank you for the clarification.

There may be some difficulties with implementing this, but it's worth considering.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant