I've been contracted to create a scripted sequence for a vehicle which has to dock with a platform, drop off a cargo package, fly across the sim through a series of waypoints, pick up a cargo, and then return to the platform to repeat the cycle.
I have no problem doing any of these steps, but I'm at a dividing line in terms of how I should implement my work: I can do this easily enough with a non-physical vehicle (moderatel difficult), or I could implement a low-level AI to control a physical vehicle (moderately difficult, but more potential for things to go wrong).
My big concern will be sim lag, as I'm not sure which method will be faster. Here are some key points for each:
Non-physical
*Fast timer loop to spout off link messages to a distributed set of scripts for llSetPos() and llSetRot() calls bypassing the .2 second script pause for each call.
*Waypoints can be reached exactly, as well as exact positioning/rotation of the vehicles for docking purposes
*griefers won't be able to physically interfere with the vehicles' progression
*would have to code my own "physics" to handle realistic turning and accelleration/decelleration in a believable manner.
Physical
*fast timer loop for the AI to check position, velocity, and rotation and to make adjustments to the controls of the vehicle
*would need to use at_target() and not_at_target() events to determine if it's reached it's destination yet
*would need to switch to a non-physical movement state when docking and dropping off cargo to have exact rotations/positions align up
*smooth movement for any observers.
*susceptable to outside interferrence.
both methods have their good and bad points I think, so going either way would be the same amount of effort in my book. my big concern is how badly would both methods impact the sim? I'm planning on using a timer loop of .1 seconds for either implementation.