Interface IMyNaturalGravityComponent
Describes natural gravity provider It may be IMySphericalNaturalGravityComponent or IMyModAPINaturalGravityImplementation
Namespace: VRage.Game.ModAPI
Assembly: VRage.Game.dll
Syntax
public interface IMyNaturalGravityComponent
Properties
GravityLimit
Gets distance between Position of gravity provider, and it's most distant point
Declaration
float GravityLimit { get; }
Property Value
Type | Description |
---|---|
System.Single |
IsWorking
Gets whither block is working or not
Declaration
bool IsWorking { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Position
Declaration
Vector3D Position { get; set; }
Property Value
Type | Description |
---|---|
Vector3D |
Methods
GetGravityMultiplier(Vector3D)
Get gravity scalar
Declaration
float GetGravityMultiplier(Vector3D worldPoint)
Parameters
Type | Name | Description |
---|---|---|
Vector3D | worldPoint | World coordinates |
Returns
Type | Description |
---|---|
System.Single | Gravity scalar, in meters per second |
GetProxyAABB(out BoundingBoxD)
Get bounding box around gravity provider
Declaration
void GetProxyAABB(out BoundingBoxD aabb)
Parameters
Type | Name | Description |
---|---|---|
BoundingBoxD | aabb | Bounding box in world coordinates |
GetWorldGravity(Vector3D)
Gets gravity vector
Declaration
Vector3 GetWorldGravity(Vector3D worldPoint)
Parameters
Type | Name | Description |
---|---|---|
Vector3D | worldPoint | World coordinates |
Returns
Type | Description |
---|---|
Vector3 | Gravity vector, in meters per second |
IsPositionInRange(Vector3D)
Tests if the specified point is within the gravity of this entity.
Declaration
bool IsPositionInRange(Vector3D worldPoint)
Parameters
Type | Name | Description |
---|---|---|
Vector3D | worldPoint | Point to test |
Returns
Type | Description |
---|---|
System.Boolean | true if in range; false if not |