Package net.risingworld.api.collider
Klasse SphereCollider
java.lang.Object
net.risingworld.api.collider.Collider
net.risingworld.api.collider.SphereCollider
Represents a sphere collider, which has an (optional) offset and a radius
-
Verschachtelte Klassen - Übersicht
Von Klasse geerbte verschachtelte Klassen/Schnittstellen net.risingworld.api.collider.Collider
Collider.Type
-
Konstruktorübersicht
KonstruktorBeschreibungSphereCollider
(float radius) Creates a new sphere collider which is centered to the object.SphereCollider
(float x, float y, float z, float radius) Creates a new sphere collider.SphereCollider
(float x, float y, float z, float radius, boolean isTrigger) Creates a new sphere collider. -
Methodenübersicht
-
Konstruktordetails
-
SphereCollider
public SphereCollider(float radius) Creates a new sphere collider which is centered to the object.- Parameter:
radius
- the radius of the sphere.
-
SphereCollider
public SphereCollider(float x, float y, float z, float radius) Creates a new sphere collider.- Parameter:
x
- optional x offset.y
- optional y offset.z
- optional z offset.radius
- the radius of the sphere.
-
SphereCollider
public SphereCollider(float x, float y, float z, float radius, boolean isTrigger) Creates a new sphere collider.- Parameter:
x
- optional x offset.y
- optional y offset.z
- optional z offset.radius
- the radius of the sphere.isTrigger
- if true, this becomes a ghost collider (i.e the player doesn't collide with it, but you can still use it for raycasts).
-
-
Methodendetails
-
getCenter
-
getRadius
public float getRadius() -
isTrigger
public boolean isTrigger()Gets whether or not this is a "ghost collider". This means the player won't collide with it (i.e he can simply walk through this collider), but it can still be used for raycasts etc.- Gibt zurück:
- true if this is a ghost collider / trigger collider, false if not.
-