Gameplay / ProjectileMovementConfig
ProjectileMovementConfig Interface
Type of projectile configuration
Implemented by
Table of contents
Properties
acceleration: number |
|---|
| The acceleration (cm/s) of the movement of the projectile, a positive value will accelerate the projectile and a negative value will decelerate. default: 0,range: [-10000,10000] |
gravityScale: number |
| The multiplier of the impact of world gravity on a projectile, where a positive value causes the projectile to fall, a negative value increases, and 0 causes the projectile to move in a straight line. default: 1,range: [-10, 10] |
homingAcceleration: number |
| Acceleration towards the target object (cm/s). Default: 10000. Range: [0, 10000]. |
homingTarget: GameObject |
| The target object tracked by the projectile will accelerate to the target when the target object is not empty. default: null。 |
initialSpeed: number |
| Initial motion speed of projectile (cm/s), default: 5000, range: [110000] |
isRotationFollowsVelocity: boolean |
| Does the forward direction of the projectile (and the mounted object) always follow the direction of motion. True: Follow. False: Do not follow. default: true。 |
lifeSpan: number |
| The longest time (s) that the projectile exists, 0 means no limit. Default: 10. Range: [0, 1000] |
maxSpeed: number |
| The maximum movement speed of the projectile (cm/s), 0 means no limit. default: 0,range: [0,100000] |
speedRetention: number |
| After the collision, the projectile maintains the ratio of the original speed. 0 represents. Default: 0.6. Range: [0,1] |
Properties
acceleration
• Optional acceleration: number
The acceleration (cm/s) of the movement of the projectile, a positive value will accelerate the projectile and a negative value will decelerate. default: 0,range: [-10000,10000]
gravityScale
• Optional gravityScale: number
The multiplier of the impact of world gravity on a projectile, where a positive value causes the projectile to fall, a negative value increases, and 0 causes the projectile to move in a straight line. default: 1,range: [-10, 10]
homingAcceleration
• Optional homingAcceleration: number
Acceleration towards the target object (cm/s). Default: 10000. Range: [0, 10000].
homingTarget
• Optional homingTarget: GameObject
The target object tracked by the projectile will accelerate to the target when the target object is not empty. default: null。
initialSpeed
• Optional initialSpeed: number
Initial motion speed of projectile (cm/s), default: 5000, range: [110000]
isRotationFollowsVelocity
• Optional isRotationFollowsVelocity: boolean
Does the forward direction of the projectile (and the mounted object) always follow the direction of motion. True: Follow. False: Do not follow. default: true。
lifeSpan
• Optional lifeSpan: number
The longest time (s) that the projectile exists, 0 means no limit. Default: 10. Range: [0, 1000]
maxSpeed
• Optional maxSpeed: number
The maximum movement speed of the projectile (cm/s), 0 means no limit. default: 0,range: [0,100000]
speedRetention
• Optional speedRetention: number
After the collision, the projectile maintains the ratio of the original speed. 0 represents. Default: 0.6. Range: [0,1]
Editor API