Jump to content
You are about to reply to a thread that has been inactive for 101 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Posted (edited)

Hello fine folks of SL, I am not a novice programmer, but somewhat unfamiliar with this aspect of LSL, so I'm hoping someone here might be able to help me out. I have two sims that are adjacent to each other, and an event taking place on one of them. The second sim is functioning as an 'overflow' sim, where people who can't fit on the main sim can stay and hopefully watch. What I wanted to do was script an item that I would rez out; people can click it and it will automatically set their camera position to the event location on the second sim.

 

I know that only attachments and objects you're sitting on can request permission to control your camera, so I have already scripted it to rez an object, that then automatically attaches to the person who clicked (I have set it up to use my sims' experience). The problem I'm having is how to actually move the camera to the right coordinates. llSetCameraParams seems to not allow this, as you can only set the camera's position and focus in region coordinates, which precludes me from setting it to coordinates on another region. I thought about perhaps having the attachment move to the other region and use llSetCameraParams from there, but that's a no go as well, as there's a very small limit on how far an attachment can move from the attached avatar (and wasn't sure that would work anyhow.)

 

Is there some function I don't know about that would help, or some workaround I'm not thinking of that could be used to set camera coords to a neighboring region? Thank you in advance, I saw functionality like this before, so I'm fairly certain it's possible, my knowledge of lsl just may not be strong enough to know where to look.

 

EDIT: Never mind, my issue was actually with my viewer settings. Using llSetCameraParams worked just fine, so long as i just calculated the difference between current coordinates and the coordinates of the event. My viewer's settings just weren't allowing the camera to travel that far. Once I fixed that, my script worked just fine.

Edited by desthemantis
Figured out problem
Posted
11 hours ago, desthemantis said:

EDIT: Never mind, my issue was actually with my viewer settings. Using llSetCameraParams worked just fine, so long as i just calculated the difference between current coordinates and the coordinates of the event. My viewer's settings just weren't allowing the camera to travel that far. Once I fixed that, my script worked just fine.

This is a common problem and hard to debug. Glad you figured it out.

Be sure to instruct your users on how to fix ~their viewer's settings to match.

  • Thanks 2
Posted

You can't move the camera outside the draw distance of the avatar, I think. The user's viewer is only getting info about stuff in that range.

Hint: If you're doing an event where the audience is just watching, get the audience to sit down. Avatars seated on stationary objects use less resources than walking ones, because they don't get frequent position updates.

  • Thanks 1
Posted
9 hours ago, animats said:

You can't move the camera outside the draw distance of the avatar, I think. The user's viewer is only getting info about stuff in that range.

I can definitely move the cam much further than that, thousands of meters up and down to stored positions within a region, and I've just tried it from a neighboring region and it works there as well.

I haven't waited a super long time to see if the objects stop appearing after a while, but I kinda think the draw distance and associated interest list are both based on the cam's location rather than the avatar's. As noted above, though, there can also be a limit on how far the cam is permitted to stray from the avatar, which may even be the default setting.

(Ancient history that is probably completely irrelevant now: I was once surprised to learn that the limit of six point light sources was "nearest" to the avatar location, not cam position.)

  • Like 1
Posted
3 hours ago, Qie Niangao said:

I can definitely move the cam much further than that, thousands of meters up and down to stored positions within a region, and I've just tried it from a neighboring region and it works there as well.

 Vertical and horizontal position are handled differently. The server tells the viewer about everything up in the sky, whether it's being displayed by the viewer or not. Horizontally, the server tells the viewer about regions in range, and most of the objects in them. That's what's available for camming.

2raw-extreme.thumb.png.95d807806d71f3b32871c05997321dc8.png

2RAW EXTREME - a driving region. One of those track regions with tracks spiraling up into the sky. About 4000m of vertical.

This is a test with my Sharpview experimental viewer, in an unlocked camming test mode. The servers tell the viewers about more objects than the viewers usually show. In the LL or Firestorm viewers, you couldn't see all of this at once, but you could cam through all of it. So that's the space you can explore by camming.

(How much to show if you're not graphics-limited is an interesting question. In Sharpview, you can always see the ground, which is nice for flying and parachuting. But you also see all the sky junk when you're on the ground, which is annoying.)

 

 

You are about to reply to a thread that has been inactive for 101 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...