Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
car-sim-remaster
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
9631059
car-sim-remaster
Commits
d222d1b2
Commit
d222d1b2
authored
Jul 10, 2020
by
kash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change vibrate shoulder trigger algorithm
parent
5ba655c5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
152 additions
and
213 deletions
+152
-213
indexLayout.xml
.idea/.idea.CarSimulation/.idea/indexLayout.xml
+1
-0
workspace.xml
.idea/.idea.CarSimulation/.idea/workspace.xml
+61
-74
SampleScene.unity
Assets/Scenes/SampleScene.unity
+62
-130
final orginal.prefab
Assets/prefabs/final orginal.prefab
+18
-0
Side.cs
Assets/scripts/Side.cs
+10
-9
No files found.
.idea/.idea.CarSimulation/.idea/indexLayout.xml
View file @
d222d1b2
...
...
@@ -19,6 +19,7 @@
<Path>
.vs
</Path>
<Path>
Library
</Path>
<Path>
Logs
</Path>
<Path>
Temp
</Path>
<Path>
obj
</Path>
</explicitExcludes>
</component>
...
...
.idea/.idea.CarSimulation/.idea/workspace.xml
View file @
d222d1b2
This diff is collapsed.
Click to expand it.
Assets/Scenes/SampleScene.unity
View file @
d222d1b2
This diff is collapsed.
Click to expand it.
Assets/prefabs/final orginal.prefab
View file @
d222d1b2
...
...
@@ -3735,6 +3735,7 @@ GameObject:
-
component
:
{
fileID
:
6517492368474291617
}
-
component
:
{
fileID
:
4444491943193057865
}
-
component
:
{
fileID
:
168629611
}
-
component
:
{
fileID
:
5824258220074940130
}
m_Layer
:
0
m_Name
:
final orginal
m_TagString
:
Player
...
...
@@ -4243,6 +4244,7 @@ MonoBehaviour:
dampingRatio
:
3
forceshift
:
0.2
setSus
:
1
divider
:
10
---
!u!114
&4444491943193057865
MonoBehaviour
:
m_ObjectHideFlags
:
0
...
...
@@ -4271,6 +4273,22 @@ MonoBehaviour:
iterationNumbers
:
100
longestJump
:
10
layer
:
8
---
!u!114
&5824258220074940130
MonoBehaviour
:
m_ObjectHideFlags
:
0
m_CorrespondingSourceObject
:
{
fileID
:
0
}
m_PrefabInstance
:
{
fileID
:
0
}
m_PrefabAsset
:
{
fileID
:
0
}
m_GameObject
:
{
fileID
:
6517492368474291616
}
m_Enabled
:
1
m_EditorHideFlags
:
0
m_Script
:
{
fileID
:
11500000
,
guid
:
bc20e1b6b2e6d7845858bb5c2d12459e
,
type
:
3
}
m_Name
:
m_EditorClassIdentifier
:
power
:
15
minSpeed
:
10
speedMultiply
:
0.5
shoulderOn
:
0
---
!u!1
&6517492368491616081
GameObject
:
m_ObjectHideFlags
:
0
...
...
Assets/scripts/Side.cs
View file @
d222d1b2
...
...
@@ -8,18 +8,16 @@ public class Side : MonoBehaviour
// Start is called before the first frame update
private
void
OnTriggerEnter
(
Collider
collider
)
private
void
OnCollisionEnter
(
Collision
other
)
{
if
(
collid
er
.
transform
.
root
.
tag
==
"Player"
)
if
(
oth
er
.
transform
.
root
.
tag
==
"Player"
)
{
collid
er
.
transform
.
root
.
GetComponent
<
ShoulderVibrate
>().
shoulderOn
=
1
;
oth
er
.
transform
.
root
.
GetComponent
<
ShoulderVibrate
>().
shoulderOn
=
1
;
}
// Debug.Log("On shoulder");
// wheel.transform.Translate(0, UpForce, 0);
}
private
void
On
TriggerExit
(
Collider
collider
)
private
void
On
CollisionExit
(
Collision
collider
)
{
if
(
collider
.
transform
.
root
.
tag
==
"Player"
)
{
...
...
@@ -27,9 +25,12 @@ public class Side : MonoBehaviour
}
}
private
void
OnTriggerStay
(
Collider
collider
)
private
void
OnCollisionStay
(
Collision
collider
)
{
Debug
.
Log
(
collider
.
transform
.
root
.
name
);
// Debug.Log("col"
);
if
(
collider
.
transform
.
root
.
tag
==
"Player"
)
{
collider
.
transform
.
root
.
GetComponent
<
ShoulderVibrate
>().
shoulderOn
=
1
;
...
...
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