mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixed jumping bug
This commit is contained in:
parent
0072f0e6b5
commit
0665348ae2
2 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ define({
|
|||
WALK_SPEED: 4,
|
||||
RUN_SPEED: 8,
|
||||
FLY_SPEED: 6.2,
|
||||
JUMP_SPEED: 70,
|
||||
JUMP_SPEED: 20,
|
||||
MAX_THROW_FORCE: 18,
|
||||
|
||||
// restitution: bouncyness, friction: rubbing, density: mass
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ function (Parent, Box2D, Settings, CollisionDetector, Item) {
|
|||
|
||||
this.body.SetAwake(true);
|
||||
var vector = new Box2D.Common.Math.b2Vec2(0, -Settings.JUMP_SPEED);
|
||||
this.body.ApplyImpulse(vector, this.body.GetPosition());
|
||||
this.body.SetLinearVelocity(vector);
|
||||
|
||||
this.setStanding(false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue