Skip to content

Commit

Permalink
added debugging example
Browse files Browse the repository at this point in the history
  • Loading branch information
LordOfDragons committed Jul 29, 2024
1 parent 0a41d8b commit 8be64cf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exampleVR/ExampleVR.degp
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
<cacheDirectory>cache</cacheDirectory>
<baseGameDefinition>DragonScript Basic</baseGameDefinition>
<projectGameDefinition>ExampleVR.degd</projectGameDefinition>
<scriptModule version='1.10'>DragonScript</scriptModule>
<scriptModule version='1.23'>DragonScript</scriptModule>
</gameProject>
9 changes: 9 additions & 0 deletions exampleVR/data/scripts/StartGame.ds
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pin Dragengine.Gui
pin Dragengine.Scenery
pin Dragengine.Preloading
pin Dragengine.Utils
pin Dragengine.Debugging



Expand Down Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion exampleVR/data/scripts/element/PlayerClass.ds
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8be64cf

Please sign in to comment.