Velocity (Particle)
Description
Returns or sets the particle's velocity as an SIVector3.
C# Syntax
// get accessor Object rtn = Particle.Velocity; // set accessor Particle.Velocity = Object;
Examples
VBScript Example
' ' Example that demonstrates how the velocity of ' a particle can be set programmatically ' NewScene , false set ParTypeCol = CreateParticleType set oRoot = ActiveProject.ActiveScene.Root set oParticleCloud = oRoot.AddParticleCloud( ParTypeCol , "MyCloud" ) set oParticleCloudPrim = oParticleCloud.ActivePrimitive oParticleCloudPrim.AddParticles 1000 , ParTypeCol(0) set oParticleCollection = oParticleCloudPrim.Particles set oPos = XSIMath.CreateVector3() set oVel = XSIMath.CreateVector3() oVel.Set 0,0,0 for i = 0 to 9 for j = 0 to 9 for k = o to 9 set oParticle = oParticleCollection( i*100 + j*10 + k ) oPos.X = -5 + i oPos.Y = -3 + j oPos.Z = k oParticle.Position = oPos oParticle.Size = 0.5 oParticle.AgeLimit = 100 oParticle.Age = 0 oVel.Y = j + i oParticle.Velocity = oVel next next next PlayForwardsFromStart
Autodesk Softimage v7.5