Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotation in Mouselook

Astolfo Forcella
Registered User
Join date: 23 May 2007
Posts: 7
04-22-2008 09:32
Hello to all,

an scripted object follow the avatar with the position llDetectedPos(0), the rotation llDetectedRot(0) and an offset; always remaining to the same distance from the body of the avatar but not when the avatar is in mouselook (change the rotation)

Do I can to maintain the same distance from the avatar body also when it is in mouselook?

Sorry for my English :-P

Bye
Astolfo Forcella
Registered User
Join date: 23 May 2007
Posts: 7
04-23-2008 06:40
up...
Astolfo Forcella
Registered User
Join date: 23 May 2007
Posts: 7
04-30-2008 07:45
up

is it possible?
Kidd Krasner
Registered User
Join date: 1 Jan 2007
Posts: 1,938
04-30-2008 07:54
From: Astolfo Forcella

an scripted object follow the avatar with the position llDetectedPos(0), the rotation llDetectedRot(0) and an offset; always remaining to the same distance from the body of the avatar but not when the avatar is in mouselook (change the rotation)

Do I can to maintain the same distance from the avatar body also when it is in mouselook?


Are you sure it's not just your perception? Or is it possible that there's something else in your script that acts in relation to mouselook?

Mouselook just affects your client. The position between the avatar and the object is determined on the server. If there are two people present, they will both get the object and avatars positioned at the same place, even if one is in mouselook. If you moved the object on behalf of the avatar in mouselook, the other person would see the same movement.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
04-30-2008 09:10
From: Kidd Krasner
Mouselook just affects your client.

That's not true. When the avatar is free to move, it turns horizontally to point as closely as possible to the camera direction. llGetRot() in attachments and llDetectedRot()/llGetObjectDetails+OBJECT_ROT also return a rotation that indicates the direction the camera is pointing in mouselook. I believe the avatar's head/eyes will also follow the mouselook camera as closely as possible (whether or not the avatar is free to move).

See http://www.lslwiki.net/lslwiki/wakka.php?wakka=llDetectedRot
Kidd Krasner
Registered User
Join date: 1 Jan 2007
Posts: 1,938
04-30-2008 11:49
From: Hewee Zetkin
That's not true. When the avatar is free to move, it turns horizontally to point as closely as possible to the camera direction. llGetRot() in attachments and llDetectedRot()/llGetObjectDetails+OBJECT_ROT also return a rotation that indicates the direction the camera is pointing in mouselook. I believe the avatar's head/eyes will also follow the mouselook camera as closely as possible (whether or not the avatar is free to move).

Well, the question was about distance, not rotation, but perhaps that's a language problem.

But what you're saying isn't about either the distance between the object and avatar or the angle of the vector between them. It's about the direction the avatar is looking. In that sense, it's really the same as the user just turning in place when not in mouselook. Yeah, mouselook changes the UI for turning, and provides an additional degree of freedom, but it's still the user controlling the client that's causing the avatar to change direction, not mouselook per se.

This suggests a bug in the way the object uses llDetectedRot such that it only works correctly if the avatar is looking horizontally - something that happens frequently in mouselook but rarely otherwise.