X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FCharacter.cc;h=3a9559f003776ed32a813afd365b9fa0dfec7fab;hb=c082286454bb1e5a7e887a53268b084b923904f3;hp=ac5f8bcb6693349b44679613279465f36fdd7546;hpb=25aefe01ef7dbdb603c51411e04b0d6a6107684f;p=chaz%2Fyoink diff --git a/src/Character.cc b/src/Character.cc index ac5f8bc..3a9559f 100644 --- a/src/Character.cc +++ b/src/Character.cc @@ -61,8 +61,10 @@ void Character::update(Mf::Scalar t, Mf::Scalar dt) Mf::Scalar mag = x.length(); Mf::Scalar d = 50.0; - current.force = -5 * (current.position - Mf::Vector2(500.0, 200.0)) - - 2.0 * current.velocity; + current.force = Mf::Vector2(0.0, -2000.0); + //current.force += -15.0 * x - 1.5 * current.velocity; + current.force += -20.0 * (mag - d) * (x / mag) - 2.0 * current.velocity; + current.force += userForce; current.recalculate(); std::cout << "force: " << current.momentum << std::endl; @@ -85,7 +87,7 @@ void Character::handleEvent(const Mf::Event& event) { // really just for heroine... - Mf::Scalar force = 500.0; + Mf::Scalar force = 4000.0; Mf::Vector2 left = Mf::Vector2(-force, 0.0); Mf::Vector2 right = Mf::Vector2(force, 0.0);