Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Slowdown with llMoveToTarget?

Maarek North
Registered User
Join date: 3 May 2006
Posts: 14
11-11-2007 22:09
I'm doing the typical elevator script even though I've read through pages of forum threads I just can't seem to figure out how to stop the object you are sitting on from slowing down as it comes to the finished spot.

It gets to like 10m and then slows down considerably. I'm only going about 45 meters up. I am not sure if I should be setting a llSetForce value or the llApplyImpulse to keep it going its steady speed all the way up? How do I go about figuring out the vector of force needed to keep the constant speed?

Another question... How do you use those to break the 700 barrier and reach highs of 4k as well? Maybe I just am not putting enough force ... or I'm not sure. I can post code if needed... An abstract might work as well. Thanks for the help.
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
11-11-2007 23:44
The trick to getting a constant speed is to move to a target at the same distance. In other words, set your target something like 40m ahead, and update the target every few seconds to keep it 40m out. Of course, you wonder how to stop... use the llTarget() function to set your true destination. Then, check for that destination in your at_target() event. If you're at the true destination, do llStopMoveToTarget().