-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from 2024FALL-SWPP/feature/finalsoftbody
Feature/finalsoftbody
- Loading branch information
Showing
21 changed files
with
52,098 additions
and
103 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
Assets/SWPPT3/Scripts/Main/ScriptableObjects/SoftbodyScript.asset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!114 &11400000 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 0 | ||
m_CorrespondingSourceObject: {fileID: 0} | ||
m_PrefabInstance: {fileID: 0} | ||
m_PrefabAsset: {fileID: 0} | ||
m_GameObject: {fileID: 0} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 11500000, guid: 1473d3df9778433e9c9a8f1015f8a109, type: 3} | ||
m_Name: SoftbodyScript | ||
m_EditorClassIdentifier: | ||
mass: 2 | ||
physicsRoughness: 2 | ||
softness: 2 | ||
damp: 0.5 |
8 changes: 8 additions & 0 deletions
8
Assets/SWPPT3/Scripts/Main/ScriptableObjects/SoftbodyScript.asset.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using UnityEngine; | ||
|
||
namespace SWPPT3.SoftbodyPhysics | ||
{ | ||
public class RubberJump : MonoBehaviour | ||
{ | ||
private Rigidbody _rb; | ||
|
||
private void Awake() | ||
{ | ||
_rb = GetComponent<Rigidbody>(); | ||
} | ||
|
||
private void OnCollisionEnter(Collision collision) | ||
{ | ||
// foreach (ContactPoint contact in collision.contacts) | ||
// { | ||
// if (contact.normal.y >= 0.7f) | ||
// { | ||
// Vector3 jumpForce = Vector3.up * (_rb.mass * 30f); | ||
// _rb.AddForce(jumpForce, ForceMode.Impulse); | ||
// | ||
// Debug.Log($"Applied Jump Force: {jumpForce} at Contact Point Normal: {contact.normal}"); | ||
// break; // 하나라도 조건 만족하면 탈출 | ||
// } | ||
// } | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.