Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Variable for Z velocity?

Onionmorph Belvedere
Second Life Resident
Join date: 27 Oct 2004
Posts: 5
02-26-2005 14:40
How can I define a variable to equal the velocity on the Z axis? I'm at a lose as to how to make it be ONLY up/down movement..
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
02-26-2005 15:14
To make a variable equal to the current velocity on the z axis, do this:

vector vel = llGetVel();
float zVel = vel.z;

Its not easy using llApplyImpulse/llSetForce to constrain an object to only movement on one axis, which is what I think you're trying to do. Before I answer the latter question ("I'm at a lose as to how to make it be ONLY up/down movement.";) I need more information on exactly what you're trying to do.
==Chris
Onionmorph Belvedere
Second Life Resident
Join date: 27 Oct 2004
Posts: 5
02-26-2005 16:03
not attempting to limit it to Z movement, just want it to spawn a trail of objects.. but not if the AV is going past a certain speed (falling, for instance)