Skip to content

class_physics2ddirectspacestate

reduz edited this page Feb 23, 2014 · 11 revisions

Physics2DDirectSpaceState

#####Inherits: Object

Brief Description

Direct access object to a space in the physics2dserver.

Member Functions

Description

Direct access object to a space in the physics2dserver. It's used mainly to do queries against objects and areas residing in a given space.

Member Function Description

Intersect a ray in a given space, the returned object is a dictionary with the following fields: \

		position: place where ray is stopped\\

		normal: normal of the object at the point where the ray was stopped \\

		shape:  shape index of the object agaisnt which the ray was stopped\\

		collider_: collider agaisnt which the ray was stopped\\

		collider_id: collider id of the object agaisnt which the ray was stopped\\

		collider: collider object agaisnt which the ray was stopped\\

		rid:  [[rid|RID]] of the object agaisnt which the ray was stopped\\

		If the ray did not intersect anything, then null is returned instead of a [[dictionary|Dictionary]].

Intersect a given shape (RID or shape2d) against the space, the intersected shapes are returned in a special result object.

Clone this wiki locally