Commit graph

1507 commits

Author SHA1 Message Date
Richard Davey
cf27547793 The Matter.Body function scale has been updated so if the Body originally had an inertia of Infinity this will be restored at the end of the call. This happens if you set a Matter Body to have fixed rotation. Fix #6369 2024-01-31 20:32:10 +00:00
Richard Davey
786a3933cd Factory.staticBody had the wrong return type in the docs/TS defs. Fix #6693 2024-01-12 18:18:06 +00:00
Richard Davey
0b32610e56 Updated version to 3.70 2023-11-10 15:04:01 +00:00
Richard Davey
b44b2eda5a Revert "Merged all of the Matter JS "Improved performance and reduced memory usage" changes from PR 1238"
This reverts commit bfd08db935.
2023-11-10 14:58:18 +00:00
Richard Davey
1cae6391b3 Revert "Testing sleep static fixes"
This reverts commit f0d5280cf8.
2023-11-10 14:58:02 +00:00
Richard Davey
f0d5280cf8 Testing sleep static fixes 2023-11-10 13:44:47 +00:00
Richard Davey
bfd08db935 Merged all of the Matter JS "Improved performance and reduced memory usage" changes from PR 1238 2023-11-09 22:12:12 +00:00
Richard Davey
4d555958de Added setDirectControl to allow a body to calculate velocity from position changes
Also added component method and internal autoFrame vec2.
2023-10-26 23:03:08 +01:00
Richard Davey
fbec8aebc9 Working through auto update optimizations 2023-10-26 22:03:18 +01:00
Richard Davey
f4a9b993cc Testing Body.autoUpdate 2023-10-26 19:02:19 +01:00
Richard Davey
ae24bc9d03 Updated GetCollidesWith 2023-10-04 21:31:54 +01:00
Richard Davey
f7f070eedf Merge all the functions into the component 2023-10-04 21:30:50 +01:00
Richard Davey
6bfaa94c4d Add Collision Component mixin 2023-10-04 21:30:41 +01:00
Richard Davey
07620231e5 Add Collision Component and properties 2023-10-04 21:30:27 +01:00
Richard Davey
3268650dcb Make Collision Component capable of working with Groups and Tilemap Layers 2023-10-04 17:09:37 +01:00
Richard Davey
0cb99a7ecf Added canCollide method and used it in all collision checks 2023-10-04 16:29:07 +01:00
Richard Davey
fd899c03e8 Update SetCollisionObject.js 2023-10-04 16:28:29 +01:00
Richard Davey
2461bf076a Added collision category, collision mask and related methods 2023-10-04 16:28:22 +01:00
Richard Davey
922b756503 Added collision category marker and nextCategory method 2023-10-04 16:27:37 +01:00
Richard Davey
eda08c20f5 Exposed Collision Component 2023-10-04 16:26:20 +01:00
Richard Davey
a08c25fd35 Added Collision component 2023-10-04 16:26:11 +01:00
Richard Davey
279a25ca88 Create Collision.js 2023-10-04 16:23:23 +01:00
Richard Davey
4e61b9fd13 Create ArcadeCollider.js 2023-10-04 16:23:17 +01:00
Richard Davey
9121ea527d Create SetCollidesWith.js 2023-10-04 16:23:13 +01:00
Richard Davey
e25e2489c4 Update SetCollisionObject.js 2023-10-04 12:49:27 +01:00
Richard Davey
49e97291cf SetCollisionObject is a new function that Arcade Physics bodies use internally to create and reset their ArcadeBodyCollision data objects. 2023-10-04 12:46:58 +01:00
Richard Davey
b364995f2f Added Body.slideFactor vec2
* Arcade Physics Bodies have a new property called `slideFactor`. This is a Vector2 that controls how much velocity is retained by a Body after it has been pushed by another Body. The default value is 1, which means it retains all of its velocity. If set to zero, it will retain none of it. This allows you to create a Body that can be pushed around without imparting any velocity to it.
* `Body.setSlideFactor` is a new method that sets the Body's `slideFactor` property.
2023-10-04 11:57:37 +01:00
Richard Davey
563137ac78 Typo fix 2023-10-04 11:57:24 +01:00
Richard Davey
94662cdbc7 StaticBody.setSize will now check to see if the body has a Game Object or not, and only call getCenter and the frame sizes if it has. This fixes a bug where calling physics.add.staticBody would throw an error if you provided a width and height. Fix #6630 2023-09-27 18:22:01 +01:00
Richard Davey
a1bc5e247b Clarify set body docs further 2023-09-14 11:47:31 +01:00
samme
90799f39ed
Docs: StaticBody#reset description 2023-08-22 08:48:01 -07:00
Richard Davey
9080dbf1fd Updated documentation to explain about calling convertTiles 2023-08-15 23:37:05 +01:00
Richard Davey
c5d53f9e94 Fixed typo 2023-08-08 13:08:54 +01:00
Richard Davey
23cd25f482 PhysicsGroup will now set the classType and null the config when an array of single configuration objects is given in the constructor. Fix #6519 2023-07-21 18:13:37 +01:00
Richard Davey
f0c6bd63bd The Matter Physics ignoreGravity boolean is now checked during the Matter Engine internal functions, allowing this property to now work again. Fix #6473 2023-07-21 17:40:47 +01:00
Richard Davey
a504c78d44 Physics.Arcade.World.singleStep is a new method that will advance the Arcade Physics World simulation by exactly 1 step (thanks @monteiz) 2023-07-21 16:33:31 +01:00
Richard Davey
2a2b9181f8 Adding documentation 2023-04-12 03:58:49 +01:00
Richard Davey
69841028bb Matter.convertTilemapLayers had an edge-case which could create composite bodies unintentionally. If any tiles had multiple colliders and you were providing body creation options, the parts property in the options would be modified and then concatenated with any bodies created after it. This could mean that some tiles would be combined when they shouldn't be, and on large maps would eventually hang once the convex hull got too big / complex. It now runs a copy on the object before using it - fix #5977 2023-04-12 03:08:52 +01:00
Richard Davey
4e18d35098 Fixed doc types 2023-04-04 17:55:56 +01:00
Richard Davey
8adbb15c13 Added new Matter Body methods (velocity and speed) 2023-04-04 15:05:42 +01:00
Richard Davey
0a8f9a9f04 Fixed jsdoc types 2023-04-04 15:05:11 +01:00
Richard Davey
24c85af875 Upgrade to MatterJS v0.19 2023-04-03 22:01:39 +01:00
Richard Davey
b5f1b2b588 The MatterTileBody class, which is created when you convert a Tilemap into a Matter Physics world, will now check to see if the Tile has flipX or flipY set on it and rotate the body accordingly. Fix #5893 2023-03-22 17:45:18 +00:00
Richard Davey
881d62075f Remove console.logs. Fix #6420 2023-03-22 16:19:55 +00:00
Richard Davey
c8acb16fa7 Added { willReadFrequently } to every canvas context, no matter where it comes from 2023-03-09 17:30:04 +00:00
Richard Davey
aa3e1d17ce Updated documentation 2023-02-27 16:26:04 +00:00
Richard Davey
884a2f1fad Added Matter Walls type 2023-02-01 18:08:40 +00:00
Richard Davey
dae80ee845 Update MatterWorldConfig.js 2023-01-27 17:45:32 +00:00
samme
ca2cef5281 Set blocked.none in processX(), processY() 2023-01-22 10:30:42 -08:00
samme
5c5829867c Docs: Enable#enableBody() and Enable#disableBody()
- Optional args in enableBody()
- Descriptions
2023-01-11 10:00:01 -08:00