Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cave Overlay Plugin
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
Cave Overlay Plugin
Commits
86bfd750
Commit
86bfd750
authored
5 years ago
by
Sebastian Pape
Browse files
Options
Downloads
Patches
Plain Diff
More debugging
parent
8de71fd3
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!4
Develop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CAVEOverlay.uplugin
+1
-1
1 addition, 1 deletion
CAVEOverlay.uplugin
Source/CAVEOverlay/Private/CAVEOverlayController.cpp
+23
-17
23 additions, 17 deletions
Source/CAVEOverlay/Private/CAVEOverlayController.cpp
with
24 additions
and
18 deletions
CAVEOverlay.uplugin
+
1
−
1
View file @
86bfd750
...
...
@@ -3,7 +3,7 @@
"Version": 1,
"VersionName": "1.0",
"FriendlyName": "CAVEOverlay",
"Description": "Adds the ability to black out the CAVE
D
oor
s
and display the magic tape",
"Description": "Adds the ability to black out the CAVE
d
oor and display the magic tape",
"Category": "Other",
"CreatedBy": "",
"CreatedByURL": "",
...
...
This diff is collapsed.
Click to expand it.
Source/CAVEOverlay/Private/CAVEOverlayController.cpp
+
23
−
17
View file @
86bfd750
...
...
@@ -43,30 +43,30 @@ ACAVEOverlayController::ACAVEOverlayController()
}
//Creation of subcomponents
root
=
CreateDefaultSubobject
<
USceneComponent
>
(
TEXT
(
"DefaultSceneRoot"
)
)
;
root
=
CreateDefaultSubobject
<
USceneComponent
>
(
"DefaultSceneRoot"
);
SetRootComponent
(
root
);
tape_root
=
CreateDefaultSubobject
<
USceneComponent
>
(
TEXT
(
"TapeRoot"
)
)
;
sign_root
=
CreateDefaultSubobject
<
USceneComponent
>
(
TEXT
(
"SignRoot"
)
)
;
tape_root
=
CreateDefaultSubobject
<
USceneComponent
>
(
"TapeRoot"
);
sign_root
=
CreateDefaultSubobject
<
USceneComponent
>
(
"SignRoot"
);
tape_root
->
SetupAttachment
(
root
);
sign_root
->
SetupAttachment
(
root
);
//Loading of Materials and Meshes
loadAsset
(
TEXT
(
"/CAVEOverlay/Stripes"
)
,
tape_material_
);
loadAsset
(
TEXT
(
"/CAVEOverlay/StopMaterial"
)
,
sign_material_
);
loadAsset
(
TEXT
(
"/CAVEOverlay/Plane"
)
,
plane_mesh_
);
loadAsset
(
"/CAVEOverlay/Stripes"
,
tape_material_
);
loadAsset
(
"/CAVEOverlay/StopMaterial"
,
sign_material_
);
loadAsset
(
"/CAVEOverlay/Plane"
,
plane_mesh_
);
tape_material_dynamic_
=
UMaterialInstanceDynamic
::
Create
(
tape_material_
,
NULL
);
sign_material_dynamic_
=
UMaterialInstanceDynamic
::
Create
(
sign_material_
,
NULL
);
tape_material_dynamic_
=
UMaterialInstanceDynamic
::
Create
(
tape_material_
,
tape_root
);
sign_material_dynamic_
=
UMaterialInstanceDynamic
::
Create
(
sign_material_
,
sign_root
);
tape_negative_y
=
createMeshComponent
(
FName
(
"TapeNegY"
)
,
tape_material_dynamic_
,
plane_mesh_
,
tape_root
);
tape_negative_x
=
createMeshComponent
(
FName
(
"TapeNegX"
)
,
tape_material_dynamic_
,
plane_mesh_
,
tape_root
);
tape_positive_y
=
createMeshComponent
(
FName
(
"TapePosY"
)
,
tape_material_dynamic_
,
plane_mesh_
,
tape_root
);
tape_positive_x
=
createMeshComponent
(
FName
(
"TapePosX"
)
,
tape_material_dynamic_
,
plane_mesh_
,
tape_root
);
tape_negative_y
=
createMeshComponent
(
"TapeNegY"
,
tape_material_dynamic_
,
plane_mesh_
,
tape_root
);
tape_negative_x
=
createMeshComponent
(
"TapeNegX"
,
tape_material_dynamic_
,
plane_mesh_
,
tape_root
);
tape_positive_y
=
createMeshComponent
(
"TapePosY"
,
tape_material_dynamic_
,
plane_mesh_
,
tape_root
);
tape_positive_x
=
createMeshComponent
(
"TapePosX"
,
tape_material_dynamic_
,
plane_mesh_
,
tape_root
);
sign_negative_y
=
createMeshComponent
(
FName
(
"SignNegY"
)
,
sign_material_dynamic_
,
plane_mesh_
,
sign_root
);
sign_negative_x
=
createMeshComponent
(
FName
(
"SignNegX"
)
,
sign_material_dynamic_
,
plane_mesh_
,
sign_root
);
sign_positive_y
=
createMeshComponent
(
FName
(
"SignPosY"
)
,
sign_material_dynamic_
,
plane_mesh_
,
sign_root
);
sign_positive_x
=
createMeshComponent
(
FName
(
"SignPosX"
)
,
sign_material_dynamic_
,
plane_mesh_
,
sign_root
);
sign_negative_y
=
createMeshComponent
(
"SignNegY"
,
sign_material_dynamic_
,
plane_mesh_
,
sign_root
);
sign_negative_x
=
createMeshComponent
(
"SignNegX"
,
sign_material_dynamic_
,
plane_mesh_
,
sign_root
);
sign_positive_y
=
createMeshComponent
(
"SignPosY"
,
sign_material_dynamic_
,
plane_mesh_
,
sign_root
);
sign_positive_x
=
createMeshComponent
(
"SignPosX"
,
sign_material_dynamic_
,
plane_mesh_
,
sign_root
);
//Set initial Position, Rotation and Scale of Tape
tape_negative_y
->
SetRelativeLocationAndRotation
(
FVector
(
0
,
-
wall_distance_
,
0
),
FRotator
(
0
,
0
,
90
));
...
...
@@ -164,6 +164,9 @@ void ACAVEOverlayController::BeginPlay()
player_pawn_
=
Cast
<
AVirtualRealityPawn
>
(
GetWorld
()
->
GetFirstPlayerController
()
->
GetPawn
());
refreshPawnComponents
();
//Debugging
UE_LOG
(
CAVEOverlayLog
,
Error
,
TEXT
(
"Tape: %p, Sign: %p"
),
tape_material_dynamic_
,
sign_material_dynamic_
);
}
float
ACAVEOverlayController
::
calculateOpacityFromPosition
(
FVector
position
)
{
...
...
@@ -220,11 +223,14 @@ void ACAVEOverlayController::Tick(float DeltaTime)
//Sign Logic
UDisplayClusterSceneComponent
*
flystick
=
IDisplayCluster
::
Get
().
GetGameMgr
()
->
GetNodeById
(
TEXT
(
"flystick"
));
if
(
flystick
!=
nullptr
)
{
if
(
flystick
)
{
FVector
flystick_position
=
flystick
->
GetRelativeTransform
().
GetLocation
();
bool
flystick_in_door
=
positionInDoorOpening
(
flystick_position
);
float
sign_opacity
=
calculateOpacityFromPosition
(
flystick_position
);
//Debugging
UE_LOG
(
CAVEOverlayLog
,
Error
,
TEXT
(
"Fly: %p, Pos: (%f,%f,%f), Opacity: %f"
),
flystick
,
flystick_position
.
X
,
flystick_position
.
Y
,
flystick_position
.
Z
,
sign_opacity
);
sign_negative_x
->
SetRelativeLocation
(
FVector
(
-
wall_distance_
,
flystick_position
.
Y
,
flystick_position
.
Z
));
sign_negative_y
->
SetRelativeLocation
(
FVector
(
flystick_position
.
X
,
-
wall_distance_
,
flystick_position
.
Z
));
sign_positive_x
->
SetRelativeLocation
(
FVector
(
+
wall_distance_
,
flystick_position
.
Y
,
flystick_position
.
Z
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment