Add background
This commit is contained in:
@@ -40,9 +40,6 @@ public class RopeBreaker : MonoBehaviour
|
||||
|
||||
[Tooltip("Initial downward impulse for falling rope end")]
|
||||
[SerializeField] private float initialFallImpulse = 2.0f;
|
||||
|
||||
[Tooltip("Force Y position reset on start to ensure proper falling")]
|
||||
[SerializeField] private bool forceYReset = true;
|
||||
|
||||
// Private references
|
||||
private Rope originalRope;
|
||||
@@ -122,10 +119,9 @@ public class RopeBreaker : MonoBehaviour
|
||||
|
||||
// Set specific transform to follow instead of using tag
|
||||
follower.SetTargetTransform(originalStartPoint);
|
||||
|
||||
follower.canFall = false; // Player rope end doesn't fall
|
||||
follower.followSpeed = ropeFollowSpeed;
|
||||
follower.trailing = ropeTrailing;
|
||||
follower.useGravity = true; // Player rope end doesn't use gravity
|
||||
|
||||
// Create second break point (for the rock-attached end)
|
||||
GameObject secondBreakObj = new GameObject("RopeBreakPoint_Second");
|
||||
@@ -138,15 +134,13 @@ public class RopeBreaker : MonoBehaviour
|
||||
|
||||
// Set specific transform to follow instead of using tag
|
||||
secondFollower.SetTargetTransform(originalEndPoint);
|
||||
|
||||
secondFollower.canFall = true; // Rock end can fall
|
||||
secondFollower.followSpeed = ropeFollowSpeed;
|
||||
secondFollower.trailing = ropeTrailing;
|
||||
secondFollower.useGravity = true; // Enable gravity for hanging rope end
|
||||
secondFollower.gravityStrength = ropeGravityStrength;
|
||||
secondFollower.verticalHangStrength = ropeVerticalHangStrength;
|
||||
secondFollower.damping = ropeDamping;
|
||||
secondFollower.initialFallImpulse = initialFallImpulse;
|
||||
secondFollower.forceYReset = forceYReset;
|
||||
|
||||
// Create initial separation
|
||||
Vector3 direction = (originalEndPoint.position - breakPointPosition).normalized;
|
||||
|
||||
Reference in New Issue
Block a user