PhysicsScene2D

struct in UnityEngine

Cambiar al Manual

Descripción

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.

Funciones Públicas

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 colliders in the PhysicsScene2D, returning the first intersection only.
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.

Funciones Estáticas

OverlapColliderChecks a Collider against Colliders in the PhysicsScene2D, returning all intersections.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961