Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Camera Control and rotating the avatar

Kayaker Magic
low carbonated footprint
Join date: 11 Sep 2008
Posts: 109
05-26-2009 21:24
I am occasionally rotating a seated avatar with llSetLinkPrimitiveParams PRIM_ROTATION. The camera normally stays focused on the avatar but does not rotate when the avatar is rotated like this. I tried using llSetCameraParam and CAMERA_POSITION with a position calculated behind the avatar. This almost worked but the camera view JUMPED WILDLY every time. Then I tried using parts of Ben Linden’s Camera Override Script http://secondlife.blogs.com/bulkupload/files/Camera_overide.lsl to try and get the camera to track this rotating avatar. This works better, now the camera view only jerks unpleasantly left-and-right every time I execute a PRIM_ROTATION on the avatar.
Is it possible to make the camera track smoothly in my situation?
Cerise Sorbet
Registered User
Join date: 8 Jun 2008
Posts: 254
05-26-2009 22:48
Hi Kayaker, check this out, makes the camera move with the prim when you sit down.

http://wiki.secondlife.com/wiki/LlSetCameraEyeOffset
Cerise Sorbet
Registered User
Join date: 8 Jun 2008
Posts: 254
05-26-2009 22:55
Oh that makes you move with the root and you are doing a child aren't you? Maybe that does not help you.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
05-26-2009 23:09
Yeah, I believe you pretty much have to use absolute positioning to move and rotate the camera relative to the seat, rather than with it. It can be made PRETTY smooth, but there always seem to be a few jerks and odd jumps. In fact, when I created a device that moves the camera with the controls before performing some other functions, I noticed that every once in a while the camera jumps momentarily back to some previous position (waaay back) on its path of movement (which the script can't even be doing because it does NOT keep track of previous positions!). Moving a little more pops it back to where it SHOULD be. Very, very odd and as far as I can tell there's no way to get around it. I guess a JIRA should be created for this behavior, but I haven't yet taken the time to nail down a simple and easily repeatable set of reproduction steps.