Version: 2023.2
언어: 한국어

PhysicsScene2D

struct in UnityEngine

매뉴얼로 전환

설명

Represents a single instance of a 2D physics Scene.

A 2D physics Scene owns all 2D physics component objects added to it and can perform a simulation of them as well as execute queries against them. All of this functionality is isolated from any other physics Scene. Using this, multiple independent physics Scenes can coexist.

변수

subStepCountThe number of simulation sub-steps that occurred during the last simulation step.
subStepLostTimeThe amount of simulation time that has been "lost" due to simulation sub-stepping hitting the maximum number of allowed sub-steps.

Public 함수

BoxCastCasts a box against colliders in the PhysicsScene2D, returning the first intersection only.
CapsuleCastCasts a capsule against colliders in the PhysicsScene2D, returning the first intersection only.
CircleCastCasts a circle against colliders in the PhysicsScene2D, returning the first intersection only.
GetRayIntersectionCast a 3D ray against the 2D Colliders in the Scene.
IsEmptyDetermines whether the physics Scene is empty or not.
IsValidDetermines whether the physics Scene is valid or not.
LinecastCasts a line segment against colliders in the PhysicsScene2D, returning the first intersection only.
OverlapAreaChecks an area (non-rotated box) against Colliders in the PhysicsScene2D, returning the first intersection only.
OverlapBoxChecks a box against Colliders in the PhysicsScene2D, returning the first intersection only.
OverlapCapsuleChecks a capsule against Colliders in the PhysicsScene2D, returning the first intersection only.
OverlapCircleChecks a circle against Colliders in the PhysicsScene2D, returning the first intersection only.
OverlapPointChecks a point against Colliders in the PhysicsScene2D, returning the first intersection only.
RaycastCasts a ray against colliders in the PhysicsScene2D, returning the first intersection only.
SimulateSimulate physics associated with this PhysicsScene.

정적 함수

OverlapColliderChecks a Collider against Colliders in the PhysicsScene2D, returning all intersections.