Commit d222d1b2 authored by kash's avatar kash

change vibrate shoulder trigger algorithm

parent 5ba655c5
......@@ -19,6 +19,7 @@
<Path>.vs</Path>
<Path>Library</Path>
<Path>Logs</Path>
<Path>Temp</Path>
<Path>obj</Path>
</explicitExcludes>
</component>
......
This diff is collapsed.
......@@ -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
......
......@@ -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 (collider.transform.root.tag == "Player")
if (other.transform.root.tag == "Player")
{
collider.transform.root.GetComponent<ShoulderVibrate>().shoulderOn = 1;
other.transform.root.GetComponent<ShoulderVibrate>().shoulderOn = 1;
}
// Debug.Log("On shoulder");
// wheel.transform.Translate(0, UpForce, 0);
}
private void OnTriggerExit(Collider collider)
private void OnCollisionExit(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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment