| Anonymous | Login | Signup for a new account | 2013-05-22 10:58 UTC | ![]() |
| Main | My View | View Issues | Change Log | Roadmap | Summary | My Account |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||
| 0005941 | opensim | [REGION] Script Functions | public | 2012-03-21 07:20 | 2012-05-24 18:50 | |||||
| Reporter | Kayaker Magic | |||||||||
| Assigned To | justincc | |||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||
| Status | assigned | Resolution | open | |||||||
| Platform | OS | OS Version | ||||||||
| Product Version | ||||||||||
| Target Version | Fixed in Version | |||||||||
| Summary | 0005941: llGetObjectDetails returns ZERO_ROTATION for OBJECT_ROTATION of a seated avatar in mouselook mode | |||||||||
| Description | In SL, llGetObjectDetails(id,[OBJECT_ROTATION]); returns the rotation that describes the direction a seated avatar is looking when the avatar is in in mouselook mode. IN OpenSim this call returns <0,0,0,0> in this situation. This behavior in SL is useful for aiming weapons I suppose, although I use it for steering boats so that they go in the direction you are looking. | |||||||||
| Steps To Reproduce | Create a prim, create a new script in it, paste the script below into it and save. Sit on the prim, go into mouselook mode, and look around. On SL the second set of numbers changes as you look around. On OpenSim the second set of numbers is always <0,0,0,0> | |||||||||
| Additional Information | default { state_entry() { llSitTarget(<0,0,1>,ZERO_ROTATION); llSetTimerEvent(1.0); } timer() { key user=llAvatarOnSitTarget(); if (user!=NULL_KEY) { if (llGetAgentInfo(user)&AGENT_MOUSELOOK) { rotation prot=llGetRot(); rotation arot=llList2Rot(llGetObjectDetails(user,[OBJECT_ROT]),0); llOwnerSay((string)(llRot2Euler(prot)*RAD_TO_DEG)+(string)(llRot2Euler(arot)*RAD_TO_DEG)); } } } } | |||||||||
| Tags | No tags attached. | |||||||||
| Git Revision or version number | unknown | |||||||||
| Run Mode | Grid (Multiple Regions per Sim) | |||||||||
| Physics Engine | ODE | |||||||||
| Environment | Unknown | |||||||||
| Mono Version | None | |||||||||
| Viewer | imprudence | |||||||||
| Attached Files | ||||||||||
Notes |
|
|
(0021153) justincc (administrator) 2012-03-30 23:17 |
From a quick web search I can't see where this is documented behaviour for llGetObjectDetails(). Could you provide a link? This could be fairly trivially done in LSL_Api.llGetObjectDetails() if ScenePresence.m_headrotation were exposed via a public property. |
|
(0021526) Kayaker Magic (reporter) 2012-05-24 18:50 |
http://wiki.secondlife.com/wiki/LlGetRot [^] has a mention of this now. I searched the Wiki and the WEB looking for documentation on this. I once saw a forum posting from someone saying approximately “In an attached object worn by an avatar in mouselook mode, llGetRot returns the rotation of the avatars HEAD instead of the rotation of the avatar body”. If you read weapons scripts, you see that they assume that this is true: The weapon fires in the direction the avatar is looking, not the direction the body is facing. I discovered that the same thing is true when llGetRot is called from a prim that the avatar is seated on. I begged the SL Scripting Forum crowd to help me find a reference to this, and they replied “You have useful information, add it to the Wiki yourself!” I figured if I added this documentation, I'd be accused of cheating! Finally Void Singer took pity on me and added one line to the llGetRot documentation (link above) that says: “llGetRot will return an accurate facing for Avatars seated or in mouselook, but only a rough direction otherwise when called from an attached prim.” |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-03-21 07:20 | Kayaker Magic | New Issue | |
| 2012-03-30 23:17 | justincc | Note Added: 0021153 | |
| 2012-03-30 23:17 | justincc | Assigned To | => justincc |
| 2012-03-30 23:17 | justincc | Status | new => feedback |
| 2012-05-24 18:50 | Kayaker Magic | Note Added: 0021526 | |
| 2012-05-24 18:50 | Kayaker Magic | Status | feedback => assigned |
| Copyright © 2000 - 2012 MantisBT Group |