기술 자료

Unity Engine

Unity Engine

PhysicsWorld.ExplosionDefinition

Used to define the parameters when using PhysicsWorld.Explode.
읽는 시간 1분최근 업데이트: 21일 전

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public struct PhysicsWorld.ExplosionDefinition

Static Fields

Value

Description

MaxImpulseThe maximum magnitude allowed for PhysicsWorld.ExplosionDefinition.impulsePerLength. Larger magnitudes have no useful effect because body speeds are capped each simulation step, so values are clamped into this range.

Constructors

Constructor

Description

ExplosionDefinition()Create a default explode definition.

Properties

Property

Description

falloffThe falloff distance beyond the radius. Impulse is reduced to zero at this distance.
hitCategoriesThe categories that will produce hits.
impulsePerLengthImpulse per unit length. This applies an impulse according to the shape perimeter that is facing the explosion. Explosions only apply to circles, capsules, and polygons. This may be negative for implosions. The magnitude is clamped to PhysicsWorld.ExplosionDefinition.MaxImpulse.
positionThe center of the explosion in world space.
radiusThe radius of the explosion.

Static Properties

Property

Description

defaultDefinitionCreate a default explode definition.