Jump to content

can a scripted object detect body part motion?


DragonWhisperer
 Share

You are about to reply to a thread that has been inactive for 4618 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I have a necklace that has a two prim chain joining at each side of the neck. Is it possible to detect neck movement? I'd like the front part of the chain to hang toward the ground if my avatar bends over and also swing side to side if the avi's neck moves/spins side to side.

I was considering using code that detects movement in the other chain prim since it should move with the attachment point, but again, can I detect the direction and speed that it moves in?

 

Link to comment
Share on other sites


DragonWhisperer wrote:

So an attached object cannot detect if it has moved or are you saying that if I am wearing a prim hat and start a dance animation, as far as the server is concerned, the prim hat stays at the same global/local position even though the animation might have me moving several meters in different directions?

Yes! As far as the server is concerned your avatar is nothing but a box with a position and a rotation

The server does control that and nothing more:smileyvery-happy:

When your avatar is moved by an animation it is all client side and so are attachments rendering and texture rendering

Link to comment
Share on other sites


DragonWhisperer wrote:

So an attached object cannot detect if it has moved or are you saying that if I am wearing a prim hat and start a dance animation, as far as the server is concerned, the prim hat stays at the same global/local position even though the animation might have me moving several meters in different directions?

The prim hat would remain relative to the avatar. Attachments don't have a global position, afaik. They only have a position in relation to their attachment point.

Link to comment
Share on other sites

In addition to what everyone else said, avatar attachments remain fixed in relation to their attachment point, and can't truly 'pivot' on that point to obey gravity.

A flexi prim can dangle down, as if sort of obeying gravity, but its base will remain fixed in relation to the avatr and the point it is attached on the avatar. So for example if you make a flexi kimono sleeve, intending it to hang naturally when the arm is horizontal, that flexi part won't hang as naturally when the arm is vertical. It will come off in an arc, instead.

And since animation effects are all client side, what you see at a given moment isn't what anyone else sees. Taking a dance as an example, you and your dance partner won't be seeing your right foot stepping down at the same instant. You'll each appear to be in sync on your screen, because your computer is doing the client-side calculations to display both of you on your screen. But if you could see her screen and yours side by side, the "two couples" would likely be out of step with each other.

Link to comment
Share on other sites

no can do... to be attached the pieces would need to be linked... if linked they are treated as a single physical object...

but that doesn't matter because of two more important facts... all attachments spaces are separate (yes even to the same spot), so no cross linking.

and of course the most important... attaching turns off physics.

 

 

it MAY be possible to get some vague dangle/linking effects going with particles though... since they will target attachments and render as expected (since they are also clientside like animations)

Link to comment
Share on other sites

Here's one imperfect and partial solution...

Make the necklace so the part that goes from the collar bone around the back of the neck and back to the collar bone is normal prims, and shaped to drape over the shoulders.

Make the front loop of chain as an alpha texture on a flat flexi prim, with the base edge along the collar bone, and tilted outward slightly so the curve of the flexi flows out far enough to miss the breasts, when standing normally.

If you carefully adjust the stiffness and gravity settings of the flexi part, you could have it so when she bends forward, the chain loop appears to swing away from the body, and when she leans to the side, the loop would distort somewhat to the side.

Where this will fail is that the loop will, if she leans back, vanish into her chest, since an attachment can't detect collision with the avatar. It will also fail in that it would need careful tweaking of the flexi part's stiffness and gravity to fit different avatar shapes.

All in all, this might be a solution for a personal item that you're willing to heavily fine-tune, and use for certain specific situations. But it wouldn't work well as an item to sell to general users, because adjusting the flexi parameters is too esoteric. You'd need a pretty cleverly scripted and well done adjustment HUD to make it easy enough for a typical customer to make it work for them.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4618 days.

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
 Share

×
×
  • Create New...