wiki.sine.space | sinespace

Scripting/SphereCollider

From wiki.sine.space
Revision as of 02:41, 28 December 2020 by Edisonwu (Talk | contribs) (Created page with "A sphere collider. =Members= {{ScriptFunction|bool|Enabled|{get; set;}|Whether the sphere collider component is enabled or not.|5= local thisObject=Space.Host.ExecutingObjec...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.