A kind of Poseball


I have made now a kind of poseball, which let me find different sitting and laying possibilities around me. I use them in my pose editor or also in the sit script. Only create a sphere and give it different names for which you search with the function. If I start a pose, findstool dos run first and the avatar is moved to the posing place.

function findstool()
{ var ids = Entities.findEntities(MyAvatar.position, 100);
for (var i = 0; i < ids.length; i++)
var id = ids[i];
var properties=Entities.getEntityProperties(id);
if (properties.name==“Stool” && sitting==true)
{ print(“name:” +properties.modelURL);
var position=properties.position;
var dimensions=properties.dimensions;
var rotation=properties.rotation;
MyAvatar.goToLocation (position, true, properties.rotation, false);
print(“position” +position.x + " y " +position.y +" z " +position.z +“rotation” +rotation.x +" y “+rotation.y +” z " +rotation.z);

    if (properties.name=="Bed" && laying==true)
    {    print("name:" +properties.modelURL);
        var position=properties.position;
        var dimensions=properties.dimensions;
        var rotation=properties.rotation;
        MyAvatar.goToLocation (position, true, properties.rotation, false);
        print("position" +position.x + " y  " +position.y +" z " +position.z +"rotation" +rotation.x +" y "+rotation.y +" z " +rotation.z);
    if (properties.name=="Mat" && meditating==true)
    {    print("name:" +properties.modelURL);
        var position=properties.position;
        var dimensions=properties.dimensions;
        var rotation=properties.rotation;
        MyAvatar.goToLocation (position, true, properties.rotation, false);
        print("position" +position.x + " y  " +position.y +" z " +position.z +"rotation" +rotation.x +" y "+rotation.y +" z " +rotation.z);


The red thing is the Mat and I have started the meditating pose. Well until now I can’t control, if already somebody is sitting at the place.


Nice, a [poseball would be a nice temp. solution. now only soem animations to put in :smile:


Well the animation isn’t put in the poseball. I only get the right avatar position and the rotation from the poseball. It isn’t a script in the poseball. The animation is started from the interface how now with the sitting script. I only find my sitting places on a other way. So I have different possibilities with “Stool”, “Bed”, “Mat”… to give the right position for different poses.


Is your pose editor saving animation presets ? That would be nice. that could then be used to create a sit script. But mabye that is what you mean.


With the pose editor I can change the joint rotations of all joints and create a pose. This settings are printed out in the script editor window and until now I must copy it and paste in the pose script.

To use the pose script create a sphere.
Name the sphere Bed for laying pose, Stool for sitting pose or Mat for meditating pose.
Position the sphere, where you want to sit.
Rotate the sphere in the right direction.
Click at the PoseButton and the poses are shown.
Click at a pose.

Well you must correct the position of the poseball until it is right. The poses are now optimized for female Mixamo avatars. It will not fully be right for male avatars. You can have many poseballs. It will choose the one, which is nearest to you with the right name.
Who dos want to try - here is the script.



And again - don’t put the script in the poseball, but start it in the interface.


My bed is come on in hifi.

And also I have remarked, that the script dosn’t find the nearest poseball, but the first in the list. So well this dos mean, I must change the script, to find the nearest.


Until now I have made the search distance smaller in the function FindStool:
var ids = Entities.findEntities(MyAvatar.position, 10);

If no poseball is found in the range, the pose will be started at the place, where you are.
Reading now:


I have made now 5 places at MagicGame. If you want to try it out, go at MagicGame to the gazebo, start the script https://dl.dropboxusercontent.com/u/48725104/Pose.js , klick at the pose button and then at one of the poses. Would be nice, to get some response, if it dos work for you or also not. All places are around the gazebo.


If you think that Secondlife is a disaster with AO’s. High Fidelity beat them.
If the walk.js (old one) is active, then the sit pose is failing We need a solution for that…

It works very cool if walk.js is disabled @summer4me
But still missing the camming like we have in SL. hard to see now how god the pose works.

:slight_smile: :slight_smile: :slight_smile: :slight_smile: Love it !


Thanks for test @Richardus.Raymaker :smile: . Oh yes, I have forgotten the camera, because I use since long time my modified inspect. I have had posted it already somewhere.

// summer4me… modifications:
// radial mode = hold b +left mouse button
// orbit mode = hold n +left mouse button
// pan mode = hold v +left mouse button
// SPACE = switching between avatar and object inspection
// w,a,s,d,e,c = avatar moving, if pan, orbit or rotation mode is activ
// j = reset camera parameters and avatar position
// k = restore old camera mode - use this, if you want, to use the normal wasd keys

For me it dos work so well, that it was now for me very odd, that in sl nothing has happened, when I have clicked b, n or v +leftmouse. The object inspection dos not always work (space key). But the avatar inspection (default) I use always. And I don’t know why, but since some time I walk also without the walk script is running, if I click w,s,a,d.

If you move far, sometime the camera doesn’t find the new position. Then click j, to reset the camera values.


Just idea, what if you add 4 small buttons with arrow ?
Cursor keys on screen so people can click that to move the camera.

Now i sound lazy :smile:


:smile: sure I can do it, but somehow it seems, that the walk is now integrated in this new animation system. I have enabled developer -> avatar -> enable Rig animation. I think, it dos need the w,s,a,d keys. Will test it.


I wanted to say 5 buttons if you count a reset.
Tested enabled rig animation. but for some reason i walked on my toes, it worked with cursor keys. But need more testing.


The poses work well, very cool :slight_smile:

Is there any way to lock the avatar in position once seated? I found I have to set up the avatar in mirror view before sitting to look at myself. This script could also use the stop a script from a script option we also need.


Here comes a new version of inspect with special wishes of @Richardus.Raymaker :smile:


I have now made 4 buttons - pan, radial and orbit mode and reset camera. For pan, radial and orbit mode left mouse click at the button pan, orbit or radial, hold the mouse pressed and move the mouse up, down, left, right to move the camera.

Thanks @Judas, yes I think there are ways, to lock the avatar. I will think more about it. But - in the moment with every update comes changes and it are many now. So I want to wait a bit, before I do more with the pose script. Will wait until the new animation system is documented and I really know, which ways hifi will go in this field.
And yes I always use the full mirror mode, to see my poses.


Tried https://dl.dropboxusercontent.com/u/48725104/summersinspect.js first try. hmm it repond slow stopped inspect.js because that one where running. but it’s still responing extreme slow. Stopped all scripts and only did start yours.

Aha, it looks like you need to hit the button and then move the mouse. Only reset seems to fail. This looks very intressting and good. :smile:


@Richardus.Raymaker. I have all scripts running, also the inspect.js. They don’t influence one the other. Is it until now for you slow? The reset button only reads in the new avatar position, if it is lost and you don’t find your avatar with radial mode - this what key j dos. I also could lay at this button key k, to restore the old camera mode.


No it works fine. hust a human controller error. explained that above.


Every time this topic floats back near the top, I see it and my brain wants to sing the title to Queen’s “It’s a Kind of Magic”.

Now you will too :stuck_out_tongue:

Also, great work @summer4me