tracer

The following code should be placed inside a prim that will act as your tracer. These will be rezzed and left behind as the ball flies/rolls. The prim should be made a phantom prim so that the ball does not "collide" with it. This prim is then placed in the contents of the cannonball/ball prim and named "tracer".

//Back to the main Cannon page// //Back to main Inclined Plane page//

code format="lsl2" //Written by Jeff Mao //Distributed under a Creative Commons Attribution 3.0 license [CC-BY](http://creativecommons.org/licenses/by/3.0/) //If you have questions about this, please feel free to contact me at jmao@mac.com. //Please share alterations, improvements, lesson plans related to this simulation, etc.

// v0.8.2 float gap = 10; integer listen_handle;

default {   on_rez(integer start_param) {       float time = llGetTimeOfDay; vector startPos = llGetPos; string mydata = "x"+(string)startPos.x +"y"+(string)startPos.y +"z"+(string)startPos.z+"t"+(string)time; llSetObjectName(mydata); }   touch_start(integer num_detected) {       llSay(0,""); listen_handle = llListen(99, "", llGetOwner, ""); llSetTimerEvent(gap); }   listen( integer channel, string name, key id, string message ) {       if (message == "reset") llDie; }   timer {       llListenRemove(listen_handle); llSetTimerEvent(0); } }

code