aboutsummaryrefslogtreecommitdiff
path: root/src/rope.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/rope.odin')
-rw-r--r--src/rope.odin16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/rope.odin b/src/rope.odin
index c6ade8d..f779c4e 100644
--- a/src/rope.odin
+++ b/src/rope.odin
@@ -71,11 +71,19 @@ object_spawner_rope :: proc(obj: Object_Resource) {
)
}
+
+ verlet := Verlet_Rope{
+ nodes = nodes,
+ node_length = f32(node_length),
+ }
+
+ // Simulate a few steps to get rid of some silliness
+ for _ in 0..<60 {
+ update_verlet_rope(&verlet)
+ }
+
make_entity(&state.rope_list, Rope{
hanging_id = image_id,
- verlet = Verlet_Rope{
- nodes = nodes,
- node_length = f32(node_length),
- },
+ verlet = verlet,
})
}