KingThaddeus Posted August 13, 2022 Share Posted August 13, 2022 I hope I've reached the right part of the SL forum, if not, please guide me to the correct section to potentially answer these questions. Also, I have no experience or knowledge in scripting so my apologies for the messy paragraph. I have a couple questions regarding attaching an avatar to another. In most cases, I believe it is done using RLV. I want to give people the possibility (mostly couples/friends) to pose with each other in sims that does not allow rezzing rights. So in the case of where 1 person owns the pose(s), I would like to know if it's possible to create a script where that person can apply a HUD that gives them the option to select the nearby avatars or write the names of avatars down in order to pose right beside them? Could then the person with the poses apply a pose to the avatar that has accepted to be attached? Thanks in advance! Link to comment Share on other sites More sharing options...
Qie Niangao Posted August 13, 2022 Share Posted August 13, 2022 There's no way for an avatar to attach to another avatar, RLV or otherwise. Depending on the details of what you want to achieve, however, there may be ways to come close. It's easy for scripts to animate multiple avatars, even (roughly) synchronized, if it doesn't matter where those avatars are with respect to each other. That's basically a dance machine or equivalently a dance "chim" that's worn by one of the dancers so nothing has to be rezzed. Probably the objective is to make the avatars retain constant relative positions, and that's harder. If you could rez on the land, this is basically what "couple dance" machines do by rezzing a pair of linked poseballs so the dancers effectively sit on the same piece of invisible furniture, and then the script plays synchronized dance animations on the avatars. That all works because two avatars can sit on the same freestanding object. So the problem comes down to approximating the "linked poseball" effect, using communicating attachments. Unfortunately one avatar cannot sit on another nor on another's attachments. And, just to make it even more frustrating, there's no practical way for an attachment to rotate an avatar, although it can change its position (clumsily), so even if an attachment knows where its avatar should go, it can't make them face the right direction. (Technically, a scripted attachment can teleport the avatar wearing it, and make it face a specific direction, but this is not a practical way to keep a pair of avatars facing the same direction.) I don't know details of RLV, but it may be worth exploring whether it can rotate the avatar on which it operates, although I'm pretty sure that can't achieve anything like the precision of sitting on a shared object. Or, for that matter, sitting on separate objects that coordinate motion. Link to comment Share on other sites More sharing options...
KingThaddeus Posted August 13, 2022 Author Share Posted August 13, 2022 Thanks@Qie Niangao, and I should've been more clear when I said "attach". I didn't mean it in a literal way, but with the help from scripts so 1 is in control of the other (RLV). I appreciate your response and I'll try and look into it some more from other angles, or just put it up on the shelf lol. 1 Link to comment Share on other sites More sharing options...
Quistess Alpha Posted August 13, 2022 Share Posted August 13, 2022 I've not tested it extensively, but avatars have a tendency to face their direction of motion when moved/pushed along the ground. if a region allows push, you could try llPushObject() on both avatars to the point between them before starting the animation. Link to comment Share on other sites More sharing options...
bobsknief Orsini Posted August 13, 2022 Share Posted August 13, 2022 Posible when both avatars are wearing a scripted attachment. No RLV or rezzing needed. Would work just like one of those "Hug Huds" but different. Link to comment Share on other sites More sharing options...
KingThaddeus Posted August 13, 2022 Author Share Posted August 13, 2022 22 minutes ago, bobsknief Orsini said: Posible when both avatars are wearing a scripted attachment. No RLV or rezzing needed. Would work just like one of those "Hug Huds" but different. @bobsknief OrsiniI was thinking something similar to those HUDs. And would it be possible for the avatar in control to move the X,Y,Z position/rotation of the other avatar with those pose-adjustment scripts? Link to comment Share on other sites More sharing options...
Coffee Pancake Posted August 13, 2022 Share Posted August 13, 2022 The only way to get two avatars into a predictable position relative to each other is to have them both sit on a separate rezzed object - like a pair of pose balls. 1 Link to comment Share on other sites More sharing options...
bobsknief Orsini Posted August 14, 2022 Share Posted August 14, 2022 11 hours ago, KingThaddeus said: @bobsknief OrsiniI was thinking something similar to those HUDs. And would it be possible for the avatar in control to move the X,Y,Z position/rotation of the other avatar with those pose-adjustment scripts? Yes, but script wise its totally diferente from your standard pose-adjustment script and the rotation is not really posible. In a nutshell you turn a avatar into a vehicle and push them around a bit to get a some what ok'is rotation. Setting the XYZ is the easy part ones you figure out the calculations. Link to comment Share on other sites More sharing options...
KingThaddeus Posted August 14, 2022 Author Share Posted August 14, 2022 9 hours ago, Coffee Pancake said: The only way to get two avatars into a predictable position relative to each other is to have them both sit on a separate rezzed object - like a pair of pose balls. Yes @Coffee Pancake, I am aware of that. My issue is that I would like the possibility of posing together in a sim without rezzing rights. Link to comment Share on other sites More sharing options...
KingThaddeus Posted August 14, 2022 Author Share Posted August 14, 2022 50 minutes ago, bobsknief Orsini said: Yes, but script wise its totally diferente from your standard pose-adjustment script and the rotation is not really posible. In a nutshell you turn a avatar into a vehicle and push them around a bit to get a some what ok'is rotation. Setting the XYZ is the easy part ones you figure out the calculations. thank you for your insight on this @bobsknief Orsini, what would you recommend I should look into to achieve this? Should I ask a scripter who's familiar with those hug HUDs? Link to comment Share on other sites More sharing options...
Qie Niangao Posted August 14, 2022 Share Posted August 14, 2022 (edited) The basic functions of selecting a partner avatar, getting permissions, and playing a paired animation should be inside this ancient item: https://marketplace.secondlife.com/p/Meikes-Hug-Kiss-202/9714182 What seems to be desired in addition to this is the ability to move the HUD-wearing avatar into proximity of the target avatar, which should often be possible for a scripted attachment, and it should sometimes be possible to position the wearer more or less in front of the target avatar—but all potentially defeated by obstacles. I just don't know of any way to rotate the HUD wearer in even an approximation of the correct orientation, but if somebody does, I'd be very interested indeed. Without that rotation part, I'm not seeing much value in moving the avatar somewhere near the target. [EDIT: Oh, now I wonder: leaving behind all the avatar positioning stuff, maybe there'd be value in having one "central" avatar on the scene holding all the animations in their HUD, and letting wearers of a different HUD be able to play the pairwise animations in that "central" avatar's HUD. I mean, it would circumvent having to transfer animations, as long as the "central" avatar is in the region. That's certainly a possible script system, if there were demand for it.] Edited August 14, 2022 by Qie Niangao Link to comment Share on other sites More sharing options...
Quistess Alpha Posted August 14, 2022 Share Posted August 14, 2022 (edited) 3 hours ago, Qie Niangao said: I just don't know of any way to rotate the HUD wearer in even an approximation of the correct orientation, but if somebody does, I'd be very interested indeed. RLV has a SetRot command, quoting from the manual: Quote Force rotate the avatar to a set direction : @setrot:<angle_in_radians>=force Implemented in v1.17 Forces the avatar to rotate towards a direction set by an angle in radians from the north. Note that this command is not very precise, nor will do anything if the action attempts to rotate the avatar by less than 10° (experimental value, it has been mentioned somewhere that 6° was the minimum). In other words, it is best to either check with a llGetRot() first, or to make the avatar turn twice, first 180° plus the desired angle, then by the angle we need. It isn't very elegant but it works. When used in an attachment, this snippet converts the current rotation of the avatar to an angle in radians suitable for @setrot: vector fwd = <1,0,0>*llGetRootRotation(); float angle = llAtan2(fwd.x, fwd.y); Also, the viewer's built-in "move to position" functionality seems to have surprisingly precise rotation control. I have (preferences->controls->(when in 3rd person)->Walk to) bound to 'q' even though I rarely use it since having played around with it for the novelty. If there were an RLV or other command that tied into that functionality, it could be quite useful. Edited August 14, 2022 by Quistess Alpha 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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