{{tag>dragonscript behavior}} [[:start|Start Page]] >> [[main|DragonScript Scripting Language]] >> [[dragengine:modules:dragonscript:abstractions|Abstraction Layers: How you want to build your Game]] >> [[dragengine:modules:dragonscript:behavior_elements|Behavior Elements]] >> **ECBehaviorVRPlayspace** * [[behaviors_use_cases|Behaviors Explained: By Use-Case]] * [[behaviors_a_to_z|Behaviors Explained: From A to Z]] ====== ECBehaviorVRPlayspace ====== {{youtube>8MOm97tG81o?medium}} Behavior in action Behavior element behavior adding VR Playspace support to actor. This behavior defines the VR Playspace. This is used as reference coordinate system. The playspace position and orientation matches the owner element position and orientation. ====== Instance Counts ====== This behavior can be used only once on an element. ====== Element Class Properties ====== This behavior has no element class properties. ====== Events ====== ===== playspaceGeometryChanged ===== Playspace position or orientation changed. ====== Required Behaviors ====== This behavior does not require other behaviors to be present. ====== Optional Behaviors ====== This behavior does not support optional behaviors. ====== Persistency ====== This behavior does not use persistency. ====== API Documentation ====== #@LinkApiDocDEDS2_HTML~classDragengine_1_1Scenery_1_1ECBehaviorVRPlayspace.html,ECBehaviorVRPlayspace~@#. Since DragonScript Module Version ''1.6'' ====== Use Cases ====== * Basic support for VR. ====== Element Class Example ====== The following example creates an element class with VR support: class MyElement extends BehaviorElementClass public func new() var ECBehaviorVRPlayspace vrPlayspace = ECBehaviorVRPlayspace.new(this) // Other behaviors typically need vrPlayspace as required behavior end end ====== Behavior Factory ====== Using element class supporting adding behaviors the behavior can be added like this: value ====== Live Examples ====== * [[https://github.com/LordOfDragons/deexamples|DEExamples Repository]]: ExampleVR project.