Physics2DShapeQueryParameters
要发送到2D形状物理查询的参数。
描述
此类包含用于 2D 相交/碰撞查询的形状和其他参数。
属性
| ||
| ||
| ||
| ||
| ||
| ||
|
方法
void |
属性说明
- bool collide_with_areas
Default |
|
Setter | set_collide_with_areas(value) |
Getter | is_collide_with_areas_enabled() |
如果true
,查询将考虑Area2D。
- bool collide_with_bodies
Default |
|
Setter | set_collide_with_bodies(value) |
Getter | is_collide_with_bodies_enabled() |
如果true
,查询将考虑PhysicsBody2D。
- int collision_layer
Default |
|
Setter | set_collision_layer(value) |
Getter | get_collision_layer() |
The physics layer(s) the query will take into account (as a bitmask). See Collision layers and masks in the documentation for more information.
- Array exclude
Default |
|
Setter | set_exclude(value) |
Getter | get_exclude() |
将被排除在冲突之外的对象或对象列表。
- float margin
Default |
|
Setter | set_margin(value) |
Getter | get_margin() |
形状的碰撞边距。
- Vector2 motion
Default |
|
Setter | set_motion(value) |
Getter | get_motion() |
正在查询的形状的运动。
- RID shape_rid
Setter | set_shape_rid(value) |
Getter | get_shape_rid() |
- Transform2D transform
Default |
|
Setter | set_transform(value) |
Getter | get_transform() |
被查询形状的变换矩阵。
方法说明
- void set_shape ( Resource shape )
设置用于碰撞/相交查询的 Shape2D。