Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetRotTarget for 1 axis

Lemieux Primeau
Registered User
Join date: 25 Oct 2006
Posts: 49
09-23-2007 15:41
I am trying to use not_at_rot_target in an attachment to give me an initial indication that an avatar might have just sat down. Then I'll check llGetAgentInfo to make sure.

From what I've seen so far, the x and y axis stay pretty steadily on 0 when my avatar is standing. Of course the z is all over the place as I rotate around it. But x and y seem solid.

When I sit, both the x and y move slightly off 0, like around 0.003. So I want to set a rot target for that change. The problem is, I can't predict z.

I have tried nRotTarget = llRotTarget(llEuler2Rot(<0,0,0>;), 0.025); but it fires constantly, I assume because of the z being way off 0.

Can this be done?
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
09-23-2007 19:24
Not seeing a way to make this work. But for detecting if the avatar might be sitting, it may work to use the moving_start and moving_end events as triggers for testing llGetAgentInfo. Once the agent is seated, I think a moving_end event will be posted, and the next moving_start will indicate standing. (Well, assuming a stationary seat... I suppose it's messier in a vehicle.) While walking or just standing, one gets a lot of noise events this way, but I suspect fewer than an acceptably responsive polling timer, and llGetAgentInfo is a pretty cheap test.
Lemieux Primeau
Registered User
Join date: 25 Oct 2006
Posts: 49
09-23-2007 20:56
Qie, thanks for the reality check.

I had consisdered moving_end and even collision_end as fall backs but as you mention, I was concerned about them being noisy. But at this point it looks like one of them will have to be the best of all evils :(

Thanks again!