summaryrefslogtreecommitdiff
path: root/src/graphyx/tests/RagdollTest.scala
blob: 63c9ce50ab79c46383896994ee473c1b8604a45a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/*
 * Graphyx
 * copyright (c) 2009 Jakob Odersky
 * made available under the MIT License
*/

package graphyx.tests

import sims.dynamics._
import sims.dynamics.joints._
import sims.geometry._
import sims.prefabs._

object RagdollTest extends Test {
  val title = "Ragdoll"
  val world = new World
  
  def init = {
    val ground = new Body((for (i <- 0 to 1000) yield new Circle(0.5,1) {pos = Vector2D(0.5 * (i - 500), 0)}): _*)
    ground.fixed = true
    world += ground
    
    world += new Ragdoll(Vector2D(0, 5))
  }

}