Skip to content

Commit

Permalink
fix blackhole effect and merged on master
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlesYWL committed Nov 4, 2019
1 parent 7d849ae commit 2e2efa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d571686447ef9f04bb9d92684a9e313c, type: 3}
m_Name:
m_EditorClassIdentifier:
pullForce: 5
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

public class BlackHoleEffect : MonoBehaviour
{
public float pullForce = 1000;
public float pullForce = 1;
private GameObject[] MeteorCollection;
private GameObject[] FireBallCollection;
// Start is called before the first frame update
Expand Down Expand Up @@ -35,9 +35,6 @@ private void GravityFunction(GameObject gameObject, GameObject[] list)
Vector3 attractForce = new Vector3(disVector.normalized.x * pullForce / (Mathf.Pow(dis, 2)),
disVector.normalized.y * pullForce / (Mathf.Pow(dis, 2)),
disVector.normalized.z * pullForce / (Mathf.Pow(dis, 2)));
Vector3 attractForce2 = new Vector3(disVector.normalized.x * pullForce / dis,
disVector.normalized.y * pullForce /dis,
disVector.normalized.z * pullForce /dis);
// Debug.Log("Force: " + attractForce);
rigidBody.AddForce(attractForce, ForceMode.Impulse);
}
Expand Down

0 comments on commit 2e2efa7

Please sign in to comment.