| 54 | | myWorld->createAnimatsBody(animat,0.1,1,makePosition(-1,0,0)); |
|---|
| 55 | | animat->getActuators().push_back(new SimpleActuator(0.0,0)); |
|---|
| | 54 | myWorld->createAnimatsBody(animat,1.0,0.1,makePosition(-4.0,0,0)); |
|---|
| | 55 | animat->getActuators().push_back(new Actuator(makeForce(1,0,0.0), makePosition(0,0,0))); |
|---|
| | 56 | animat->getActuators().push_back(new Actuator(makeForce(0.0,-0.1*palPhysicsDesc::DEFAULT_GRAVITY_Y,0.0), makePosition(0,0,0))); |
|---|
| 59 | | myWorld->createAnimatsBody(animat2,0.1,1,makePosition(1,0,0)); |
|---|
| 60 | | animat2->getActuators().push_back(new SimpleActuator(M_PI, 0)); |
|---|
| | 60 | myWorld->createAnimatsBody(animat2,1.0,0.1,makePosition(4.0,0,0)); |
|---|
| | 61 | animat2->getActuators().push_back(new Actuator(makeForce(-1,0.0,0.0), makePosition(0,0,0))); |
|---|
| | 62 | animat2->getActuators().push_back(new Actuator(makeForce(0.0,-0.1*palPhysicsDesc::DEFAULT_GRAVITY_Y,0.0), makePosition(0,0,0))); |
|---|
| 64 | | myWorld->createAnimatsBody(animat3,0.1,1,makePosition(0.1,-0.5,0)); |
|---|
| 65 | | animat3->getActuators().push_back(new Actuator(makeForce(0,0.0005,0), makePosition(0,0,0))); |
|---|
| | 66 | myWorld->createAnimatsBody(animat3,1.0,0.1,makePosition(0,4,0)); |
|---|
| | 67 | animat3->getActuators().push_back(new Actuator(makeForce(0.0,-1,0.0), makePosition(0,0,0))); |
|---|
| | 68 | animat3->getActuators().push_back(new Actuator(makeForce(0.0,-0.1*palPhysicsDesc::DEFAULT_GRAVITY_Y,0.0), makePosition(0,0,0))); |
|---|
| | 70 | boost::intrusive_ptr<Animat> animat4 = new Animat(animatGenID); |
|---|
| | 71 | boost::intrusive_ptr<PhysicalBody> body4 = |
|---|
| | 72 | myWorld->createAnimatsBody(animat4,1.0,0.1,makePosition(0,-4,0)); |
|---|
| | 73 | animat4->getActuators().push_back(new Actuator(makeForce(0.0,1,0.0), makePosition(0,0,0))); |
|---|
| | 74 | animat4->getActuators().push_back(new Actuator(makeForce(0.0,-0.1*palPhysicsDesc::DEFAULT_GRAVITY_Y,0.0), makePosition(0,0,0))); |
|---|
| | 75 | myWorld->getAnimats().insert(animat4); |
|---|
| 73 | | body->applyForce(makeForce(0.0,-palPhysicsDesc::DEFAULT_GRAVITY_Y,0.0),makePosition(0.0,0.0,0.0)); |
|---|
| 74 | | body2->applyForce(makeForce(0.0,-palPhysicsDesc::DEFAULT_GRAVITY_Y,0.0),makePosition(0.0,0.0,0.0)); |
|---|
| 75 | | body3->applyForce(makeForce(0.0,-palPhysicsDesc::DEFAULT_GRAVITY_Y,0.0),makePosition(0.0,0.0,0.0)); |
|---|
| 76 | | myWorld->step(0.01); |
|---|
| | 82 | myWorld->step(0.001); |
|---|