Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
proto_magic_leap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SOS-DM
proto_magic_leap
Commits
d197177f
Commit
d197177f
authored
1 year ago
by
CUNIN Clemence
Browse files
Options
Downloads
Patches
Plain Diff
Fixed line mode prefab instanciation position
parent
98a75459
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Assets/Prefab/ClientManager.prefab
+1
-1
1 addition, 1 deletion
Assets/Prefab/ClientManager.prefab
Assets/Prefab/Line.prefab
+1
-1
1 addition, 1 deletion
Assets/Prefab/Line.prefab
Assets/Scripts/action.cs
+10
-1
10 additions, 1 deletion
Assets/Scripts/action.cs
with
12 additions
and
3 deletions
Assets/Prefab/ClientManager.prefab
+
1
−
1
View file @
d197177f
...
...
@@ -45,7 +45,7 @@ MonoBehaviour:
m_Script
:
{
fileID
:
11500000
,
guid
:
bef838976e2f1f141a74c4f3545f83ac
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
IpAdress
:
10.129.32.
159
IpAdress
:
10.129.32.
241
---
!u!114
&1008238107981065913
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
This diff is collapsed.
Click to expand it.
Assets/Prefab/Line.prefab
+
1
−
1
View file @
d197177f
...
...
@@ -17,7 +17,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
1
m_IsActive
:
0
---
!u!4
&1638680199649653231
Transform
:
m_ObjectHideFlags
:
0
...
...
This diff is collapsed.
Click to expand it.
Assets/Scripts/action.cs
+
10
−
1
View file @
d197177f
...
...
@@ -3,6 +3,8 @@ using System.Collections.Generic;
using
System
;
using
UnityEngine
;
using
UnityEngine.XR.MagicLeap
;
using
System.Text.RegularExpressions
;
using
Unity.Mathematics
;
/// <summary>
/// The action class handle the AR projections
...
...
@@ -359,8 +361,15 @@ public class Action : MonoBehaviour
// Configuring the LineRenderer for the current alert
LineRenderer
lineRenderer
=
previousLine
.
GetComponent
<
LineRenderer
>();
if
(
lineRenderer
!=
null
)
{
lineRenderer
.
positionCount
=
2
;
lineRenderer
.
enabled
=
true
;
// Enable the LineRenderer
Vector3
lineStart
=
Camera
.
main
.
transform
.
position
+
Camera
.
main
.
transform
.
forward
*
0.5f
;
// Update the line renderer positions
lineRenderer
.
SetPositions
(
new
Vector3
[]
{
lineStart
,
SetupPos
.
GetAlertPos
(
alertId
)
});
previousLine
.
SetActive
(
true
);
// Start the coroutine for the new or updated alert
currentCoroutine
=
StartCoroutine
(
UpdateLinePosition
(
lineRenderer
,
Camera
.
main
,
targetPos
,
alertId
));
...
...
@@ -592,7 +601,7 @@ public class Action : MonoBehaviour
map
=
Instantiate
(
prefab_map
,
canva
.
transform
);
if
(
map
!=
null
)
{
Debug
.
Log
(
"Map instantiated successfully"
);
map
.
transform
.
localScale
=
new
Vector3
(
5
,
5
,
5
);
/// Set the scale of the map
map
.
transform
.
localScale
=
new
Vector3
(
3
,
3
,
3
);
/// Set the scale of the map
/// Add the spheres to the dictionary and list
/// Loop through the number of spheres and add them to the dictionary and list
...
...
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