ParticleArray: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 24: Line 24:




'''''Global parameters:'''''
<u>'''''Global parameters:'''''</u>


ShapeName - Name of the shape associated with the particle.


AnimationName - Name of the animation of the shape.
'''ShapeName -''' Name of the shape associated with the particle.


Type - Type of particle (either "Billboard" or "SpaceObject").
'''AnimationName -''' of the animation of the shape.


TimerPeriod - The period of calling the "OnTimer" event (in sec).
'''Type -''' Type of particle (either "Billboard" or "SpaceObject").


LifeTime - Life time of the particle (in sec).
'''TimerPeriod -''' The period of calling the "OnTimer" event (in sec).


'''LifeTime -''' Life time of the particle (in sec).


'''''Physical parameters:'''''


Position - Either 3D coordinate (x, y, z) or name of the selection - in this case the Object property must be set.
<u>'''''Physical parameters:'''''</u>


MoveVelocity - 3D vector (x, y, z) which describes the velocity vector of the particle direction and speed in m/s.


RotationVelocity - Float number which determines number of rotations in one second.
'''Position -''' Either 3D coordinate (x, y, z) or name of the selection - in this case the Object property must be set.


Weight - Weight of the particle (kg).
'''MoveVelocity -''' 3D vector (x, y, z) which describes the velocity vector of the particle direction and speed in m/s.


Volume - Volume of the particle (m^3).
'''RotationVelocity -''' Float number which determines number of rotations in one second.


Rubbing - Float number without dimension which determines the impact of the density of the environment on this particle. 0 - no impact (vacuum).
'''Weight -''' Weight of the particle (kg).


'''Volume -''' Volume of the particle (m^3).
'''Rubbing -''' Float number without dimension which determines the impact of the density of the environment on this particle. 0 - no impact (vacuum).
<u>'''''Render parameters:'''''</u>


'''''Render parameters:'''''


Note that all these values are set as arrays to show their development in time.
Note that all these values are set as arrays to show their development in time.
Line 61: Line 64:




Size - Size of the particle in time to render (m).
'''Size -''' Size of the particle in time to render (m).
 
'''Color -''' Colour of the particle in time to render (RGBA).


Color - Colour of the particle in time to render (RGBA).
'''AnimationPhase -''' Phase of the animation in time.


AnimationPhase - Phase of the animation in time.


<u>'''''Random parameters:'''''</u>


'''''Random parameters:'''''


RandomDirectionPeriod - Period of change of the velocity vector (s).
'''RandomDirectionPeriod -''' Period of change of the velocity vector (s).


RandomDirectionIntensity - Each MoveVelocity component will be changed with random value from interval <0, RandomDirectionIntensity>.
'''RandomDirectionIntensity -''' Each MoveVelocity component will be changed with random value from interval <0, RandomDirectionIntensity>.


OnTimer - Name of the script to run every period determined by TimerPeriod property.
'''OnTimer -''' Name of the script to run every period determined by TimerPeriod property.


Position of the particle is stored in "this" variable.
Position of the particle is stored in "this" variable.


BeforeDestroy - Name of the script to run right before destroying the particle.
'''BeforeDestroy -''' Name of the script to run right before destroying the particle.


Position of the particle is stored in "this" variable.
Position of the particle is stored in "this" variable.


Object - Object to bind this particle to.
'''Object -''' Object to bind this particle to.




[[Category: Arrays]]
[[Category: Arrays]]

Revision as of 18:19, 15 April 2006

Format: [ShapeName, AnimationName, Type, TimerPeriod, LifeTime, Position, MoveVelocity, RotationVelocity, Weight, Volume, Rubbing, Size, Color, AnimationPhase, RandomDirectionPeriod, RandomDirectionIntensity, OnTimer, BeforeDestroy, Object]


Description:


Global parameters:


ShapeName - Name of the shape associated with the particle.

AnimationName - of the animation of the shape.

Type - Type of particle (either "Billboard" or "SpaceObject").

TimerPeriod - The period of calling the "OnTimer" event (in sec).

LifeTime - Life time of the particle (in sec).


Physical parameters:


Position - Either 3D coordinate (x, y, z) or name of the selection - in this case the Object property must be set.

MoveVelocity - 3D vector (x, y, z) which describes the velocity vector of the particle direction and speed in m/s.

RotationVelocity - Float number which determines number of rotations in one second.

Weight - Weight of the particle (kg).

Volume - Volume of the particle (m^3).

Rubbing - Float number without dimension which determines the impact of the density of the environment on this particle. 0 - no impact (vacuum).


Render parameters:


Note that all these values are set as arrays to show their development in time.

If you set the array [1, 2] as a size, then at the beginning the size of the particle will be 1 and at the end of the life time of the particle it's size will be 2.

The rest of the values during the life time will be linearly interpolated.


Size - Size of the particle in time to render (m).

Color - Colour of the particle in time to render (RGBA).

AnimationPhase - Phase of the animation in time.


Random parameters:


RandomDirectionPeriod - Period of change of the velocity vector (s).

RandomDirectionIntensity - Each MoveVelocity component will be changed with random value from interval <0, RandomDirectionIntensity>.

OnTimer - Name of the script to run every period determined by TimerPeriod property.

Position of the particle is stored in "this" variable.

BeforeDestroy - Name of the script to run right before destroying the particle.

Position of the particle is stored in "this" variable.

Object - Object to bind this particle to.