Jump to content

Vehicle scripting question


Clayn Sharkfin
 Share

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

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

Recommended Posts

This sounds like the classic vaudeville routine:

Patient:   "Doc, it hurts when I do this!"

Doctor:  "Then don't do that."

Yuk, yuk. yuk.

Really, though, if you walk into obstacles with your avatar, you'll try to climb over them too. The easy solution is to stop running into walls.  Other than that, I suppose you can go to a lot of trouble to build a llPush statement into your collision_start event, written to give your animal a gentle push away from whatever it runs into.  It won't be easy, though, because you'll have to ignore collisions with the floor, the ground, and other things that you want to be able to walk on.

  • Like 1
Link to comment
Share on other sites

17 minutes ago, Rolig Loon said:

but I doubt it will affect your hill climbing skills

It totally depends on the power applied indeed. 

There are way to many factors at play here, and lots of unknowns to give good advice. Though, pretty much anything you do to counterfight one behavior will have unwanted effects on other behaviors as well.

Link to comment
Share on other sites

climbing hills is not the problem, all i want is that the animal im riding doesn't climb up a house, i thought of using a script that if you bump into something it checks to see if something is in front of you and if your speed decays below a amount it will just set the animal none physical, but im not sure if that's the best way to handle it. It mostly happens if i speed up a hill it then lifts the animal slightly off ground and it hit's the house in a angle that allows it then to climb it.

Link to comment
Share on other sites

I meant "hill climbing" metaphorically.  Arton and I are saying the same thing. Almost anything you do to stifle that bad behavior i likely to have some other undesired effect.  There's no good way to distinguish between one sort of obstacle and another and tell your animal to back off.  As I said above, you will collide with loads of things -- mostly things that you walk on like the ground and the floor, and you certainly want to be able to walk on them even if they have some slope to them.

With some vehicles, it can help if you llSetStatus(STATUS_ROTATE_X, FALSE ) and llSetStatus(STATUS_ROTATE_Y, FALSE).  I'm not sure whether that's a smart idea in your case, but it might keep your animal from leaning away from the slope.

Link to comment
Share on other sites

12 minutes ago, Dora Gustafson said:

We have a vehicle flag:  VEHICLE_FLAG_NO_DEFLECTION_UP

This may or may not be what you are looking for

Ooohh .. that looks promising. From the Wiki:

Quote

This flag prevents linear deflection parallel to world z-axis. This is useful for preventing ground vehicles with large linear deflection, like bumper cars, from climbing their linear deflection into the sky.

 

Link to comment
Share on other sites

while VEHICLE_FLAG_NO_DEFLECTION_UP may sound good and seem to be the solution it indeed is not at least not for me. The issue of what is happening is that the vehicle is hitting the mesh at a angle where the force makes it drive it self up a long the wall, i do indeed have that flag set but it does not stop it from happening. It's all really just about how your mesh or prims you use are angled.

Link to comment
Share on other sites

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