ItHadToComeToThis Posted June 10, 2020 Share Posted June 10, 2020 What would you consider the best way to make a wall walker. Not one you sit on but one that is attached to you. My thoughts were casting a ray then when a wall is detected move to position and then a combination of move to and stop move to position with some kind of push moving you in the direction. I did attempt a small test but it wasn't super smooth. Does anyone have any ideas on how this might be achieved smoothly and efficiently or is this one of those "It will work but...." situations Link to comment Share on other sites More sharing options...
Lucia Nightfire Posted June 10, 2020 Share Posted June 10, 2020 (edited) 2 hours ago, ItHadToComeToThis said: Not one you sit on but one that is attached to you. You'd probably need llTakeControls(0x3ff,TRUE,FALSE), llCastRay(), llMoveToTarget() possibly backed by llApplyImpulse() or llSetVelocity() What is missing, though, are procedural animations, something SL has needed since day1. You'll need procedural animations to rotate your pelvis on its local Y axis as you're traversing "ground" at impossible angles. I've brought it up under the "buildable animations by script" moniker at the CC UG a few times, but I think it scares the hell out of @Vir Linden, heh. There seems to be some kind of worry that procedural animation capability will ruin the animations (pose) market, where I personally think it will just shift business/market/asset types (animation asset to script based). I'm also not suggesting creating long/complex animations with it, either. There are many areas that would benefit from such a feature. I think it needs some actual study from LL and feedback from the community. Edited June 10, 2020 by Lucia Nightfire 1 Link to comment Share on other sites More sharing options...
ItHadToComeToThis Posted June 10, 2020 Author Share Posted June 10, 2020 I absolutely agree on the animation front. I was thinking about it and i will have to create pretty much an entire wall walking AO for it to work. Which I don’t mind so much but it would be much easier if I could set an animation rotation. Maybe it might eventually get added I mean...they added animation speed to their never never plans a while back. Link to comment Share on other sites More sharing options...
animats Posted June 10, 2020 Share Posted June 10, 2020 I've seen wall walkers. They use llCastRay to find the wall and then position the avatar. Link to comment Share on other sites More sharing options...
Lucia Nightfire Posted June 11, 2020 Share Posted June 11, 2020 9 hours ago, animats said: I've seen wall walkers. They use llCastRay to find the wall and then position the avatar. They do not position the avatar, they position an object the user is sitting on, which is what the OP wanted to abstain from using. Link to comment Share on other sites More sharing options...
Mollymews Posted June 12, 2020 Share Posted June 12, 2020 a similar thing came up a while ago in another thread. How to float an avatar i never answered the last time because I forgot how I used to do this back in the day. I had a bit of time today so I had a play and remembered. I used to do this in my swimming AO. So I didn't have to be in fly mode to swim in the water example of rising a avatar up into the sky and then holding it there // stick script in a box and Wear integer on; default { touch_start(integer total_number) { on = !on; // if (on) then push us up // else (not on) and we fall back down to the ground // more force and more time will push us higher float z = llGetMass() * 10.0; // force to push us up, change to whichever llSetForce(<0.0, 0.0, z * (float)on>, TRUE); llSetTimerEvent(1.0 * (float)on); // change time to whichever } timer() { // hold us in the sky llSetTimerEvent(0.0); llSetForce(<0.0, 0.0, llGetMass() * 9.809>, TRUE); // multiplier 9.809 is about right for most male and female shape types // change if necessary } } Link to comment Share on other sites More sharing options...
ItHadToComeToThis Posted June 16, 2020 Author Share Posted June 16, 2020 (edited) On 6/12/2020 at 1:21 AM, Mollymews said: Thanks for that. That was actually a help. Question for all... So I have a working version of this and its pretty smooth. One issue I am facing though using force and hover is that, the moment I collide with anything my climbing animation stops. So for example, I get to the wall, start climbing and then as soon as I collide I start doing the floating animation. Any idea on how I can get around this without using multiple llMoveTo to keep myself at a slight distance from the wall. Il post my code so far. Its a bit rough so please don't judge too harshly xD. This is just testing and getting things right before polishing. Also, reason for not using the attach event is so I could modify it while wearing it. Also, if anyone has any improvements I could try please throw them at me. **Edit** Forgot to add, its wearing an AO that mostly does it. The animation I am using is already max priority but I want people to be able to use it while wearing an AO so going to have to avoid collisions as much as possible //Lists list rCast=[]; //Bools integer timerStart=0; //Start timer integer onWall=0; //On a wall default{ state_entry(){ if(llGetAttached()){ llRequestPermissions(llGetOwner(),PERMISSION_TAKE_CONTROLS|PERMISSION_TRIGGER_ANIMATION); } } on_rez(integer param){ llResetScript(); } run_time_permissions(integer x){ if(x&PERMISSION_TAKE_CONTROLS){ llTakeControls(CONTROL_FWD|CONTROL_BACK|CONTROL_ROT_RIGHT|CONTROL_ROT_LEFT|CONTROL_LEFT|CONTROL_RIGHT|CONTROL_UP|CONTROL_DOWN,TRUE,TRUE); } } control(key id, integer level, integer edge){ integer h=level&~edge; integer r=~level&edge; integer p=level&edge; if(h&CONTROL_FWD){ if(onWall){ //Move up llStopHover(); float z=llGetMass()*10.0; llSetForce(<0.0,0.0,z*2.0>,TRUE); llStartAnimation("Climb"); }else{ if(!timerStart){ timerStart=1; llSetTimerEvent(0.5); }else{ llStopAnimation("Climb"); llSetForce(<0.0,0.0,llGetMass()*9.809>,TRUE); } } } if(r&CONTROL_FWD){ if(onWall){ vector pos=llGetPos(); llSetHoverHeight(pos.z-llGround(ZERO_VECTOR),FALSE,0.1); }else{ timerStart=0; llSetForce(<0.0,0.0,0.0>,TRUE); llSetTimerEvent(0.0); } } } timer(){ rCast=llCastRay(llGetPos(),llGetPos()+<2.0,0.0,0.5>*llGetRot(),[RC_REJECT_TYPES,RC_REJECT_AGENTS|RC_REJECT_LAND,RC_DETECT_PHANTOM,FALSE,RC_DATA_FLAGS,RC_GET_ROOT_KEY,RC_MAX_HITS,1]); //llOwnerSay("Data : "+llList2CSV(rCast)); if(llList2Key(rCast,0)){ //Activate on wall status //llOwnerSay("Wall"); onWall=1; }else{ //llOwnerSay("No wall"); //Deactivate and also reset all movement llStopHover(); onWall=0; llSetForce(<0.0,0.0,0.0>,TRUE); llStopAnimation("Climb"); } } } Edited June 16, 2020 by ItHadToComeToThis 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