Drag[en]gine Script Module DragonScript
1.23
|
Behavior adding support to VR Hand behavior to know what element they are pointing at. More...
Classes | |
class | BlockListenerFactory |
Factory creating listeners using block. More... | |
class | DefaultListener |
Default implementation of behavior instance listener. More... | |
class | Instance |
Behavior instance. More... | |
interface | Listener |
Listener for behavior instance events. More... | |
interface | ListenerFactory |
Factory creating listeners. More... | |
Public Member Functions | |
void | addListenerFactory (Block blockFactory) |
Add listener factory using block. More... | |
void | addListenerFactory (ListenerFactory factory) |
Add listener factory. More... | |
void | createListeners (Instance instance) |
Create listeners from factories adding them to behavior instance. More... | |
void | dispose () |
Dispose of behavior. More... | |
void | forEachListenerFactory (Block ablock) |
Visit listener factories with block with argument ListenerFactory. More... | |
ECComposeCollisionFilter | getCollisionFilter () |
Collision filter for AI collider. More... | |
ECBehaviorCollider | getIgnoreCollider () |
Collider to ignore during collision testing or null. More... | |
ECPVector | getOrigin () |
Test origin. More... | |
ECPFloat | getRange () |
Test range. More... | |
ECPVector | getRotation () |
Test direction rotation. More... | |
ECPShapeList | getShape () |
Test shape. More... | |
ECPString | getTestBone () |
Test bone. More... | |
ECBehaviorVRHand | getVRHand () |
VR Hand behavior or null. More... | |
ECBehaviorVRHandPointAt | new (BehaviorElementClass eclass, ECBehaviorVRHand vrHand) |
Create behavior element class. More... | |
ECBehaviorVRHandPointAt | new (BehaviorElementClass eclass, ECBehaviorVRHand vrHand, String id) |
Create behavior element class. More... | |
ECBehaviorVRHandPointAt | new (BehaviorElementClass eclass, ECBehaviorVRHand vrHand, String id, String prefix) |
Create behavior element class. More... | |
void | setIgnoreCollider (ECBehaviorCollider collider) |
Set collider to ignore during collision testing or null. More... | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
void | assignInstanceIndex (int instanceIndex) |
Assign instance index. More... | |
String | getBehaviorID () |
Unique identifier of behavior. More... | |
String | getID () |
Identifier. More... | |
int | getInstanceIndex () |
Instance index. More... | |
void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
Load instance data of another behavior. More... | |
bool | supportsBehaviorID (String identifier) |
Behavior supports loading instance data of another behavior. More... | |
Public Member Functions inherited from Dragengine.Scenery.ECBehavior | |
ECBehaviorInstance | createInstance (BehaviorElement element) |
Create Behavior instance. More... | |
Static Public Member Functions | |
static ECBehaviorVRHandPointAt | getBehaviorIn (BehaviorElementClass eclass) |
Get behavior in element class or null if absent. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
DefaultECBehavior | new (BehaviorElementClass eclass) |
Create default composeable behavior with empty identifier. More... | |
DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
Create default composeable behavior. More... | |
void | setBehaviorID (String identifier) |
Set behavior identifier. More... | |
void | useClassNameAsBehaviorID () |
Set behavior identifier to "<class-name>:<identifier>". More... | |
void | useFullyQualifiedClassNameAsBehaviorID () |
Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More... | |
Behavior adding support to VR Hand behavior to know what element they are pointing at.
Behavior uses one collider collision test located attached controller collider facing forward.
If hand component is present and a test bone is set the collision test will be attached to the component bone.
By default the test direction is rotated by -45 degrees along the X axis. This accounts for VR hand controllers typically having their Z axis along the grip direction. This causes the point at detection to point 45 degrees upwards. For easier usage rotating the point at detection direction downwards by 45 degrees helps.
By default point-at is disabled for backward compatibility.
Requires these behaviors to be present:
To this behavior add it and set the class properties. Add listener to be notified if the pointed at element changes or query the current state.
If the pointed at element has ECBehaviorVRHandPointedAt instance it will be updated by adding and removing the owner element.
void Dragengine.Scenery.ECBehaviorVRHandPointAt.addListenerFactory | ( | Block | blockFactory | ) |
void Dragengine.Scenery.ECBehaviorVRHandPointAt.addListenerFactory | ( | ListenerFactory | factory | ) |
Add listener factory.
void Dragengine.Scenery.ECBehaviorVRHandPointAt.createListeners | ( | Instance | instance | ) |
Create listeners from factories adding them to behavior instance.
void Dragengine.Scenery.ECBehaviorVRHandPointAt.dispose | ( | ) |
Dispose of behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
void Dragengine.Scenery.ECBehaviorVRHandPointAt.forEachListenerFactory | ( | Block | ablock | ) |
Visit listener factories with block with argument ListenerFactory.
|
static |
Get behavior in element class or null if absent.
Use this method to check if a particular BehaviorElementClass contains a behavior of type ECBehaviorVRHandPointAt.
ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorVRHandPointAt.getCollisionFilter | ( | ) |
Collision filter for AI collider.
ECBehaviorCollider Dragengine.Scenery.ECBehaviorVRHandPointAt.getIgnoreCollider | ( | ) |
Collider to ignore during collision testing or null.
ECPVector Dragengine.Scenery.ECBehaviorVRHandPointAt.getOrigin | ( | ) |
Test origin.
ECPFloat Dragengine.Scenery.ECBehaviorVRHandPointAt.getRange | ( | ) |
Test range.
ECPVector Dragengine.Scenery.ECBehaviorVRHandPointAt.getRotation | ( | ) |
Test direction rotation.
ECPShapeList Dragengine.Scenery.ECBehaviorVRHandPointAt.getShape | ( | ) |
Test shape.
ECPString Dragengine.Scenery.ECBehaviorVRHandPointAt.getTestBone | ( | ) |
Test bone.
ECBehaviorVRHand Dragengine.Scenery.ECBehaviorVRHandPointAt.getVRHand | ( | ) |
VR Hand behavior or null.
ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandPointAt.new | ( | BehaviorElementClass | eclass, |
ECBehaviorVRHand | vrHand | ||
) |
Create behavior element class.
ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandPointAt.new | ( | BehaviorElementClass | eclass, |
ECBehaviorVRHand | vrHand, | ||
String | id | ||
) |
Create behavior element class.
ECBehaviorVRHandPointAt Dragengine.Scenery.ECBehaviorVRHandPointAt.new | ( | BehaviorElementClass | eclass, |
ECBehaviorVRHand | vrHand, | ||
String | id, | ||
String | prefix | ||
) |
Create behavior element class.
void Dragengine.Scenery.ECBehaviorVRHandPointAt.setIgnoreCollider | ( | ECBehaviorCollider | collider | ) |
Set collider to ignore during collision testing or null.
ECComposeCollisionFilter Dragengine.Scenery.ECBehaviorVRHandPointAt.pCollisionFilter |
ECBehaviorCollider Dragengine.Scenery.ECBehaviorVRHandPointAt.pIgnoreCollider |
Array Dragengine.Scenery.ECBehaviorVRHandPointAt.pListenerFactories |
ECPVector Dragengine.Scenery.ECBehaviorVRHandPointAt.pOrigin |
ECPFloat Dragengine.Scenery.ECBehaviorVRHandPointAt.pRange |
ECPVector Dragengine.Scenery.ECBehaviorVRHandPointAt.pRotation |
ECPShapeList Dragengine.Scenery.ECBehaviorVRHandPointAt.pShape |
ECPString Dragengine.Scenery.ECBehaviorVRHandPointAt.pTestBone |
ECBehaviorVRHand Dragengine.Scenery.ECBehaviorVRHandPointAt.pVRHand |