mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
Complete Box2D to Planck.js migration
- Replace Box2D.js with Planck.js physics engine - Update all require paths from 'Lib/Vendor/Box2D' to 'Lib/Vendor/Planck' - Convert Box2D contact listeners to Planck.js event system - Fix all method name capitalization (Get* -> get*, Set* -> set*) - Update collision detection system for Planck.js compatibility - Server now starts successfully and basic physics working - Character can land on platforms - core physics functional Major milestone: Game now running on modern, maintained physics engine
This commit is contained in:
parent
875abd60d9
commit
dc779def9c
43 changed files with 701 additions and 14524 deletions
|
|
@ -53,8 +53,8 @@ function(Parent, nc, Parser, Settings) {
|
|||
}
|
||||
|
||||
var difference = {
|
||||
x: Math.abs(update.p.x - this.player.doll.body.GetPosition().x),
|
||||
y: Math.abs(update.p.y - this.player.doll.body.GetPosition().y)
|
||||
x: Math.abs(update.p.x - this.player.doll.body.getPosition().x),
|
||||
y: Math.abs(update.p.y - this.player.doll.body.getPosition().y)
|
||||
};
|
||||
|
||||
if(difference.x < Settings.PUNKBUSTER_DIFFERENCE_METERS &&
|
||||
|
|
@ -67,8 +67,8 @@ function(Parent, nc, Parser, Settings) {
|
|||
var body = this.player.doll.body;
|
||||
|
||||
var options = {
|
||||
p: body.GetPosition(),
|
||||
lv: body.GetLinearVelocity()
|
||||
p: body.getPosition(),
|
||||
lv: body.getLinearVelocity()
|
||||
};
|
||||
|
||||
nc.trigger(nc.ns.channel.to.client.user.gameCommand.send + this.player.id, "positionStateReset", options);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue