wiki.sine.space | sinespace

Scripting/SphereCollider

From wiki.sine.space
Jump to: navigation, search

A sphere collider.

Members

Enabled

bool Enabled {get; set;}

Whether the sphere collider component is enabled or not.

local thisObject=Space.Host.ExecutingObject

local sphereColl=thisObject.SphereCollider
local enabled=sphereColl.Enabled
Space.Log(enabled)

--print true.


IsTrigger

bool IsTrigger {get; set;}

Return whether the sphere collider is trigger or not.

local thisObject=Space.Host.ExecutingObject

local sphereColl=thisObject.SphereCollider
local isTrigger=sphereColl.IsTrigger;
Space.Log(isTrigger)

--print true.


Properties

Center

SVector Center {get; set;}

Return the center of the sphere collider.

local thisObject=Space.Host.ExecutingObject

local sphereColl=thisObject.SphereCollider
local center=sphereColl.Center
Space.Log(center)

--print the center.


Radius

float Radius {get; set;}

Return the radius of the sphere collider.

local thisObject=Space.Host.ExecutingObject

local sphereColl=thisObject.SphereCollider
local radius=sphereColl.Radius
Space.Log(radius)

--print the radius.