Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.ECBehaviorLookAt Class Reference

Behavior adding support to actors to know what element they are looking at. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorLookAt:
Dragengine.Scenery.DefaultECBehavior Dragengine.Scenery.ECBehavior Dragengine.Scenery.BehaviorCompatiblePersistency

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...
 

Additional Inherited Members

- Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior
void assignInstanceIndex (int instanceIndex)
 Assign instance index. More...
 
void dispose ()
 Dispose of behavior. 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...
 
- 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...
 

Detailed Description

Behavior adding support to actors to know what element they are looking at.

Behavior uses one collider collision test located attached ECBehaviorColliderAI facing forward. If no ECBehaviorColliderAI is present ECBehaviorCollider is used instead.

If ECBehaviorComponent is present and a test bone is set the collision test will be attached to the component bone. This is simple and good solution for FPS type games.

If no component and bone is used and ECBehaviorLocomotion is present then the test parameters will be updated to match the locomotion looking direction.

Requires these behaviors to be present:

To this behavior add it and set the class properties. Add listener to be notified if the looked at element changes or query the current state.

Interaction with ECBehaviorLookedAt

If the looked at element has ECBehaviorLookedAt instance it will be updated by adding and removing the owner element.


The documentation for this class was generated from the following file: