✨ Feature Requests

  • Search existing ideas before submitting- Use support.secondlife.com for customer support issues- Keep posts on-topicThank you for your ideas!
A global bounding box function for LSL/slua.
The current llGetBoundingBox function returns the bounding box with the root objects axes being used to define it. A globally based one in region co-ordinates could be useful. I've just had to put a function together to achieve this to find suitable co-ordinates for a llTriggerSoundLimited call. list GetGlobalBoundingBoxFromKey(key targetKey) { list info = llGetObjectDetails(targetKey, [OBJECT_POS, OBJECT_ROT]); list bbox = llGetBoundingBox(targetKey); if (llGetListLength(info) != 2 || llGetListLength(bbox) != 2) { // Invalid input return []; } vector rootPos = llList2Vector(info, 0); rotation rootRot = llList2Rot(info, 1); vector localMin = llList2Vector(bbox, 0); vector localMax = llList2Vector(bbox, 1); list corners = [ <localMin.x, localMin.y, localMin.z>, <localMin.x, localMin.y, localMax.z>, <localMin.x, localMax.y, localMin.z>, <localMin.x, localMax.y, localMax.z>, <localMax.x, localMin.y, localMin.z>, <localMax.x, localMin.y, localMax.z>, <localMax.x, localMax.y, localMin.z>, <localMax.x, localMax.y, localMax.z> ]; vector globalMin = <255.0, 255.0, 4096.0>; vector globalMax = <0.0, 0.0, 0.0>; integer i; for (i = 0; i < 8; ++i) { vector localCorner = llList2Vector(corners, i); vector worldCorner = localCorner * rootRot + rootPos; if (worldCorner.x < globalMin.x) globalMin.x = worldCorner.x; if (worldCorner.y < globalMin.y) globalMin.y = worldCorner.y; if (worldCorner.z < globalMin.z) globalMin.z = worldCorner.z; if (worldCorner.x > globalMax.x) globalMax.x = worldCorner.x; if (worldCorner.y > globalMax.y) globalMax.y = worldCorner.y; if (worldCorner.z > globalMax.z) globalMax.z = worldCorner.z; } return [globalMin, globalMax];
0
Ocean Depth for sailing, submarines and aquatic gameplay
Hi can you please increase ocean depth to 12288 meters for sailing, submarines and aquatic gameplay 256 x 48 = 12288 meters The ocean's average depth is about 3,682 meters (12,080 feet). The deepest point, Challenger Deep in the Mariana Trench, reaches approximately 10,994 meters (36,070 feet). The ocean is divided into several depth zones, including the abyssal and hadalpelagic zones, with the latter being the deepest. Depth zones of the ocean - World Ocean Review World Ocean Review Here's a more detailed breakdown: Average Depth: The average depth of the ocean is around 3,682 meters (12,080 feet). Deepest Point: The Challenger Deep, located in the Mariana Trench, is the deepest known point in the ocean, reaching approximately 10,994 meters (36,070 feet). Depth Zones: The ocean is divided into different zones based on depth: Abyssopelagic Zone: Also known as the abyssal zone, it extends from 4,000 to 6,000 meters (13,100 to 19,700 feet) and is characterized by near-freezing temperatures. Hadalpelagic Zone: This is the deepest zone, extending from 6,000 meters (19,700 feet) to the ocean floor, with constant temperatures just above freezing. https://www.google.com/search?q=ocean+depth&sca_esv=3d1e29cf7e253e0e&source=hp&ei=BvyMaNzFMJDawN4Pm-Gn-AE&iflsig=AOw8s4IAAAAAaI0KFo01jzOl-MnFXk7SYTjNEa_d3fXd&ved=0ahUKEwjc4PqElOqOAxUQLdAFHZvwCR8Q4dUDCA8&uact=5&oq=ocean+depth&gs_lp=Egdnd3Mtd2l6IgtvY2VhbiBkZXB0aDILEAAYgAQYkQIYigUyBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAEMgUQABiABDIFEAAYgAQyBRAAGIAEMgUQABiABDIFEAAYgARItAVQAFgAcAB4AJABAJgBcKABcKoBAzAuMbgBA8gBAPgBAvgBAZgCAaAClwGYAwCSBwMwLjGgB_UEsgcDMC4xuAeXAcIHAzQtMcgHIQ&sclient=gws-wiz
9
·

tracked

Update animesh size by manual edit and script
Currently we can't update animesh size and have to upload multiple versions of the mesh in different sizes, and upload all animations for each size. I did some research in the viewer's code, and it appears to me that it's extremely easy to add a feature to adjust the global size of an animesh by modifying the llcontrolavatar.cpp file. Here is the current setGlobalScale() function: void LLControlAvatar::setGlobalScale(F32 scale) { if (scale <= 0.0) { LL_WARNS() << "invalid global scale " << scale << LL_ENDL; return; } if (scale != mGlobalScale) { F32 adjust_scale = scale/mGlobalScale; LL_INFOS() << "scale " << scale << " adjustment " << adjust_scale << LL_ENDL; // should we be scaling from the pelvis or the root? recursiveScaleJoint(mPelvisp,adjust_scale); mGlobalScale = scale; } } And here is a modified version that currently takes into account the X size of the main prim: void LLControlAvatar::setGlobalScale(F32 scale) { if (scale <= 0.0) { LL_WARNS() << "invalid global scale " << scale << LL_ENDL; return; } scale *= mRootVolp->getScale().mV[0]; if (scale != mGlobalScale) { F32 adjust_scale = scale/mGlobalScale; LL_INFOS() << "scale " << scale << " adjustment " << adjust_scale << LL_ENDL; recursiveScaleJoint(mRoot,adjust_scale); mGlobalScale = scale; } } Note that I replaced mPelvisp by mRoot because using mPelvisp does not correctly adjust the animesh's movement during the animation." It works wonderfully. Of course, this modification as it stands could affect many existing animesh objects, so we need to add a parameter to the object, 'ANIMESH_SCALE_FACTOR', which would be set to 1 by default, adjustable via script and by manual editing of the object. We would then have something like this: scale *= mRootVolp->getAnimeshScaleFactor; Here is a gif, you can take a look, the 4 dogs are all the exact same animesh, I only changed there main prim X scale : https://gyazo.com/de2dc2904bcb4e6b8737514aa7db7d2c
11
·

tracked

Load More