Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Track following train type of thingy?O.o

heehaw Odets
Registered User
Join date: 13 Jul 2005
Posts: 11
07-31-2005 11:36
can someone somehow teach me or set me on the right track on how to build a rollercoaster that follows a track with turns ups and downs and what knot?O.o.....
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
07-31-2005 11:58
Instead of having it rely on the Havok support in SL (= rings around a solid track), I suggest using MoveToTarget and RotLookAt, with a list of each position/rotation to get through.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
07-31-2005 15:45
you will kill havok if you try to rely on it to do the positioning of your rollercoaster. Do what Jesrad recommends.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
07-31-2005 20:38
Either that, or have your coaster car use a sensor to detect invisible prims that mark the path it's supposed to take.
==Chris
_____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
07-31-2005 22:01
From: Christopher Omega
Either that, or have your coaster car use a sensor to detect invisible prims that mark the path it's supposed to take.
==Chris
Yep
heehaw Odets
Registered User
Join date: 13 Jul 2005
Posts: 11
new help >_<
08-01-2005 01:58
so anyone wanan teach me how to do that? make sensor that follows the invisble prim marker for the track?
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
08-01-2005 09:50
I'm a bit prejudiced against the use of a fast sensor() for gathering what is, essentially, fixed data. I think you should only use sensor() to get unpredictable data.

Instead I recommend building your track out of numbered prims (name them 0, 1, 2, 3, etc...), then, when you are satisfied with the track, use a "map-making" scripted tool once to get the complete, ready-to-use list of positions and rotations for your "cart" or "train" to wade through.

You may want to look here to know how to make this, you will probably want to use a sequence of Sensor() looking for prim named "0", then prim "1", etc..., which would use llDetectedPos() and llDetectedRot() to say the position and rotation of the track's prim found. Then you can copy paste from this list into your train script.

If you modify the track you can reuse the mapmaking tool to refresh the track's position/rotation list.

If you still want to go the Sensor way, you'll need a way to distinguish between each track prims. One such way is to refer to the second prim found instead of the first, since SL will return closest objects first. And have the sensor only look forward (arc = PI_BY_TWO) to avoid confusing next track prim with last track prim.
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.