From 8be64cf4ffd62375128f2261aa390d60d83832c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pl=C3=BCss=20Roland?= Date: Mon, 29 Jul 2024 23:02:58 +0200 Subject: [PATCH] added debugging example --- exampleVR/ExampleVR.degp | 2 +- exampleVR/data/scripts/StartGame.ds | 9 +++++++++ exampleVR/data/scripts/element/PlayerClass.ds | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/exampleVR/ExampleVR.degp b/exampleVR/ExampleVR.degp index 1903330..73211f2 100644 --- a/exampleVR/ExampleVR.degp +++ b/exampleVR/ExampleVR.degp @@ -6,5 +6,5 @@ cache DragonScript Basic ExampleVR.degd - DragonScript + DragonScript diff --git a/exampleVR/data/scripts/StartGame.ds b/exampleVR/data/scripts/StartGame.ds index 53f5f30..c1a6521 100644 --- a/exampleVR/data/scripts/StartGame.ds +++ b/exampleVR/data/scripts/StartGame.ds @@ -4,6 +4,7 @@ pin Dragengine.Gui pin Dragengine.Scenery pin Dragengine.Preloading pin Dragengine.Utils +pin Dragengine.Debugging @@ -63,6 +64,14 @@ class StartGame extends WindowGameWorld.Loader // To take control of the actor player.getPlayerControllable().takeControl() + // To debug your VR hand you can add and remove attachable behaviors any time during + // the game. Here is an example of adding two debug behaviors displaying the hand + // skeleton. This could be used to examine the player hand compared to the game hand + /* + player.addAttachableBehavior(DebugBehaviorVRHandPose.new(player.getVRRightHandPose())) + player.addAttachableBehavior(DebugBehaviorVRHandPose.new(player.getVRLeftHandPose())) + */ + // Assign camera director attaching the camera to the player controlled actor // at eye level. // diff --git a/exampleVR/data/scripts/element/PlayerClass.ds b/exampleVR/data/scripts/element/PlayerClass.ds index 61fed06..d1b6962 100644 --- a/exampleVR/data/scripts/element/PlayerClass.ds +++ b/exampleVR/data/scripts/element/PlayerClass.ds @@ -36,7 +36,7 @@ class PlayerClass extends BaseVRActorClass // By default only rotation of hand joints are applied. This works better with // various kinds of hand models and is easier to work with. Only rotations though - // can though not fully reproduce the hand pose. + // can not fully reproduce the hand pose. // // To apply the full pose including position set the finger tip distance and // disable only rotation. The finger tip distance is used to scale the player