Jump to content

Follower: Turn off collision for object being sat on.


Valareos
 Share

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

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

Recommended Posts

Working on the ability to sit on anyones shoulders in a micro form, by having them click a prim that follows them, and I sit on that prim.

 

The following works real well.... and I an see it beign used for dragons and riders.  BUT.. we run into the collision between avatars pushing one away, then the follwoer keeps up, and pushes further.  How do I get this "pushing" effect removed? script as I have it is below..

 

key owner;
key user;
vector offset;
chan = XXXX; default { touch_start(integer total_number) { owner = llGetOwner(); llListen( chan, "", llDetectedKey(0), "" ); llDialog(llDetectedKey(0),"Do you wish to have this follow you?",["Yes","No"],chan); } listen(integer channel, string name, key id, string message) { if(message == "Yes") { user = id; state follow; } } } state follow { state_entry() { llSetTimerEvent(.03); } touch_start(integer total_number) { llListen( chan, "", "", "" ); if(llDetectedKey(0) == owner) { llTextBox(owner,"Enter the offset in the form <x,y,z> or say Off to turn off",chan); } if(llDetectedKey(0) == user) { llInstantMessage(user,"Turning off Follower"); state default; } } listen(integer channel, string name, key id, string message) { if(message == "Off") { state default; } if(id == owner) { offset = (vector)message; } } timer() { llSensor("",user,AGENT_BY_LEGACY_NAME,10,PI); } sensor (integer num_detected) { llSetRegionPos( llDetectedPos(0) + offset * llDetectedRot(0) ); } }

 

Link to comment
Share on other sites

Working on the ability to sit on anyones shoulders in a micro form, by having them click a prim that follows them, and I sit on that prim.

 

The following works real well.... and I an see it beign used for dragons and riders.  BUT.. we run into the collision between avatars pushing one away, then the follwoer keeps up, and pushes further.  How do I get this "pushing" effect removed? script as I have it is below..

 

key owner;
key user;
vector offset;
chan = XXXX; default { touch_start(integer total_number) { owner = llGetOwner(); llListen( chan, "", llDetectedKey(0), "" ); llDialog(llDetectedKey(0),"Do you wish to have this follow you?",["Yes","No"],chan); } listen(integer channel, string name, key id, string message) { if(message == "Yes") { user = id; state follow; } } } state follow { state_entry() { llSetTimerEvent(.03); } touch_start(integer total_number) { llListen( chan, "", "", "" ); if(llDetectedKey(0) == owner) { llTextBox(owner,"Enter the offset in the form <x,y,z> or say Off to turn off",chan); } if(llDetectedKey(0) == user) { llInstantMessage(user,"Turning off Follower"); state default; } } listen(integer channel, string name, key id, string message) { if(message == "Off") { state default; } if(id == owner) { offset = (vector)message; } } timer() { llSensor("",user,AGENT_BY_LEGACY_NAME,10,PI); } sensor (integer num_detected) { llSetRegionPos( llDetectedPos(0) + offset * llDetectedRot(0) ); } }

 

Link to comment
Share on other sites

You may be stuck.  The problem is a collision betweent the bounding boxes of the two avs, which you cannot change. The way others have solved the same problem over the years has been to get both avs to sit on the same vehicle and have one of them "drive" it.  That method works because a sitting av becomes part of a phantom linkset.  It's easier to do in a convincing way if the "vehicle" is something like a horse. Still, it can be done.  Use a control event and activate a walk animation when you hit the keyboard arrow keys to control forward or backward movement.

Link to comment
Share on other sites

Might also try using sit animations that offset the animated avatar, thus allowing the follower to be some distance from the thing being followed while the animated avatar appears nearer. (I haven't tried this myself but -- famous last words -- it should work, based on how a similar trick works in physical vehicles.)

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3896 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...