SParticle
| 属性 | position | The position of the particle. |
| 属性 | velocity | The velocity of the particle. |
| 属性 | animatedVelocity | The animated velocity of the particle. |
| 属性 | totalVelocity | The total velocity of the particle. |
| 属性 | remainingLifetime | The remaining lifetime of the particle. |
| 属性 | startLifetime | The starting lifetime of the particle. |
| 属性 | startColor | The initial color of the particle. |
| 属性 | randomSeed | The random seed of the particle. |
| 属性 | axisOfRotation | Mesh particles rotate around this axis. |
| 属性 | startSize | The initial size of the particle. |
| 属性 | startSize3D | The initial 3D size of the particle. |
| 属性 | rotation | The rotation of the particle. |
| 属性 | rotation3D | The 3D rotation of the particle. |
| 属性 | angularVelocity | The angular velocity of the particle. |
| 属性 | angularVelocity3D | The 3D angular velocity of the particle. |
属性
position
The position of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
position = FirstParticle.position
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
example 2
velocity
The velocity of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
velocity= FirstParticle.velocity
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
animatedVelocity只读
The animated velocity of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
animatedVelocity= FirstParticle.animatedVelocity
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
example 2
totalVelocity只读
The total velocity of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
totalVelocity= FirstParticle.totalVelocity
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
remainingLifetime
The remaining lifetime of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
remainingLifetime= FirstParticle.remainingLifetime
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
startLifetime
The starting lifetime of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
startLifetime= FirstParticle.startLifetime
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
startColor
The initial color of the particle. The current color of the particle is calculated procedurally based on this value and the active color modules.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
startColor= FirstParticle.startColor
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
randomSeed
The random seed of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
randomSeed= FirstParticle.randomSeed
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
axisOfRotation
Mesh particles rotate around this axis.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
axisOfRotation= FirstParticle.axisOfRotation
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
startSize
The initial size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
startSize= FirstParticle.startSize
end
this.OnParticleTrigger(OnParticleTrigger)
startSize3D
The initial 3D size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
startSize3D= FirstParticle.startSize3D
end
this.OnParticleTrigger(OnParticleTrigger)
rotation
The rotation of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
rotation= FirstParticle.rotation
end
this.OnParticleTrigger(OnParticleTrigger)
rotation3D
The 3D rotation of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject) ParticlesArray = this.ParticleSystem.GetTriggerParticles(0) FirstParticle = ParticlesArray[1] rotation3D= FirstParticle.rotation3D
end
this.SubscribeToEvents() this.OnParticleTrigger(OnParticleTrigger)
</div>
</div>
<div data-gb-custom-block data-tag="tabs">
<div data-gb-custom-block data-tag="tab" data-title='Lua'>
```lua
example 2
angularVelocity
The angular velocity of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
angularVelocity= FirstParticle.angularVelocity
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)
angularVelocity3D
The 3D angular velocity of the particle.
示例
this = Space.Host.ExecutingObject
OnParticleTrigger = function(GameObject)
ParticlesArray = this.ParticleSystem.GetTriggerParticles(0)
FirstParticle = ParticlesArray[1]
angularVelocity3D= FirstParticle.angularVelocity3D
end
this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



