Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
curvedflats
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Flatland
curvedflats
Commits
9766618c
Commit
9766618c
authored
Aug 17, 2019
by
Chae Ho Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore self-collisions or self-worldline-collisions
parent
cf50696c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
4 deletions
+12
-4
Test.unity
Assets/Scenes/Test.unity
+1
-1
ExtrudedMesh.cs
Assets/Scripts/ExtrudedMesh.cs
+1
-0
FlatlandMovement.cs
Assets/Scripts/FlatlandMovement.cs
+7
-2
Planemovement.cs
Assets/Scripts/Planemovement.cs
+1
-0
PlayerMovement.cs
Assets/Scripts/PlayerMovement.cs
+2
-1
No files found.
Assets/Scenes/Test.unity
View file @
9766618c
...
@@ -3257,7 +3257,7 @@ MeshRenderer:
...
@@ -3257,7 +3257,7 @@ MeshRenderer:
m_RenderingLayerMask
:
1
m_RenderingLayerMask
:
1
m_RendererPriority
:
0
m_RendererPriority
:
0
m_Materials
:
m_Materials
:
-
{
fileID
:
2100000
,
guid
:
eb322bc5933761d4fb98f8561eadae28
,
type
:
2
}
-
{
fileID
:
2100000
,
guid
:
7286fb01c3bf28349bf3a51860aefb00
,
type
:
2
}
m_StaticBatchInfo
:
m_StaticBatchInfo
:
firstSubMesh
:
0
firstSubMesh
:
0
subMeshCount
:
0
subMeshCount
:
0
...
...
Assets/Scripts/ExtrudedMesh.cs
View file @
9766618c
...
@@ -80,6 +80,7 @@ public class ExtrudedMesh : MonoBehaviour
...
@@ -80,6 +80,7 @@ public class ExtrudedMesh : MonoBehaviour
clone
.
transform
.
GetChild
(
0
).
gameObject
.
AddComponent
<
RuntimeCSGFlatlandObject
>();
clone
.
transform
.
GetChild
(
0
).
gameObject
.
AddComponent
<
RuntimeCSGFlatlandObject
>();
clone
.
layer
=
8
;
clone
.
layer
=
8
;
clone
.
transform
.
GetChild
(
0
).
gameObject
.
layer
=
8
;
clone
.
transform
.
GetChild
(
0
).
gameObject
.
layer
=
8
;
Physics
.
IgnoreCollision
(
clone
.
GetComponentInChildren
<
MeshCollider
>(),
GetComponent
<
MeshCollider
>());
Destroy
(
clone
,
30
);
Destroy
(
clone
,
30
);
prevtime
=
sections
[
sections
.
Count
-
1
].
time
;
prevtime
=
sections
[
sections
.
Count
-
1
].
time
;
}
}
...
...
Assets/Scripts/FlatlandMovement.cs
View file @
9766618c
...
@@ -44,6 +44,11 @@ public class FlatlandMovement : MonoBehaviour
...
@@ -44,6 +44,11 @@ public class FlatlandMovement : MonoBehaviour
/// </summary>
/// </summary>
Queue
<
float
>
pathVelocitys
=
new
Queue
<
float
>();
Queue
<
float
>
pathVelocitys
=
new
Queue
<
float
>();
protected
void
Start
()
{
Physics
.
IgnoreLayerCollision
(
0
,
1
);
}
protected
void
FixedUpdate
()
protected
void
FixedUpdate
()
{
{
if
(
isAutoMove
)
if
(
isAutoMove
)
...
@@ -200,7 +205,7 @@ public class FlatlandMovement : MonoBehaviour
...
@@ -200,7 +205,7 @@ public class FlatlandMovement : MonoBehaviour
Vector3
finaldeltav
=
new
Vector3
((
float
)(
deltav
[
1
]
/
tt
),
0.0f
,
(
float
)(
deltav
[
2
]
/
tt
));
Vector3
finaldeltav
=
new
Vector3
((
float
)(
deltav
[
1
]
/
tt
),
0.0f
,
(
float
)(
deltav
[
2
]
/
tt
));
//
this.v = finaldeltav;
this
.
v
=
finaldeltav
;
}
}
...
@@ -267,7 +272,7 @@ public class FlatlandMovement : MonoBehaviour
...
@@ -267,7 +272,7 @@ public class FlatlandMovement : MonoBehaviour
/// <param name="collision"></param>
/// <param name="collision"></param>
public
virtual
void
OnCollisionEnterchild
(
Collision
collision
)
public
virtual
void
OnCollisionEnterchild
(
Collision
collision
)
{
{
Debug
.
Log
(
"Collision! ~~~~~~~~~~~~~~~~"
+
theobject
.
transform
.
parent
.
name
+
"~~~~~~~~~~~~~~~~~~~~~~"
+
collision
.
transform
.
parent
.
name
);
}
}
/// <summary>
/// <summary>
/// 나갔을때 호출
/// 나갔을때 호출
...
...
Assets/Scripts/Planemovement.cs
View file @
9766618c
...
@@ -11,6 +11,7 @@ public class Planemovement : FlatlandMovement
...
@@ -11,6 +11,7 @@ public class Planemovement : FlatlandMovement
void
Start
()
void
Start
()
{
{
base
.
Start
();
//Renderer r = theobject.GetComponent<Renderer>();
//Renderer r = theobject.GetComponent<Renderer>();
//Color materialColor = r.material.color;
//Color materialColor = r.material.color;
//r.material.color = Color.clear;
//r.material.color = Color.clear;
...
...
Assets/Scripts/PlayerMovement.cs
View file @
9766618c
...
@@ -21,6 +21,7 @@ public class PlayerMovement : FlatlandMovement,IInteractor
...
@@ -21,6 +21,7 @@ public class PlayerMovement : FlatlandMovement,IInteractor
// Start is called before the first frame update
// Start is called before the first frame update
void
Start
()
void
Start
()
{
{
base
.
Start
();
v
=
new
Vector3
(
0.0f
,
0.0f
,
0.0f
);
v
=
new
Vector3
(
0.0f
,
0.0f
,
0.0f
);
gamma
=
1.0f
;
gamma
=
1.0f
;
cnt
=
0
;
cnt
=
0
;
...
@@ -32,6 +33,7 @@ public class PlayerMovement : FlatlandMovement,IInteractor
...
@@ -32,6 +33,7 @@ public class PlayerMovement : FlatlandMovement,IInteractor
backgroundStartScale
=
background
.
transform
.
localScale
;
backgroundStartScale
=
background
.
transform
.
localScale
;
interactiveObjects
=
new
List
<
InteractiveObject
>();
interactiveObjects
=
new
List
<
InteractiveObject
>();
}
}
void
Update
()
void
Update
()
...
@@ -179,7 +181,6 @@ public class PlayerMovement : FlatlandMovement,IInteractor
...
@@ -179,7 +181,6 @@ public class PlayerMovement : FlatlandMovement,IInteractor
if
(
collision
.
transform
.
parent
!=
null
)
if
(
collision
.
transform
.
parent
!=
null
)
{
{
Debug
.
Log
(
"Collision"
);
InteractiveObject
x
=
collision
.
transform
.
parent
.
gameObject
.
GetComponent
<
InteractiveObject
>();
InteractiveObject
x
=
collision
.
transform
.
parent
.
gameObject
.
GetComponent
<
InteractiveObject
>();
if
(
x
)
if
(
x
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment