Bambosh
8038341c96
Compare maxSpeed with updated velocity
2022-12-24 15:26:13 +11:00
samme
09be12612b
Docs: change "Constructor" types to function
...
- Phaser.Types.GameObjects.Group.GroupClassTypeConstructor
- Phaser.Types.GameObjects.Particles.ParticleClassConstructor
- Phaser.Types.Tilemaps.CreateFromObjectsClassTypeConstructor
Fixes #6318
2022-12-16 15:37:09 -08:00
Richard Davey
4b4473394c
Debugging circle collision
2022-12-13 18:24:41 +00:00
Richard Davey
e2539824ec
Update World.js
2022-12-13 13:41:17 +00:00
Richard Davey
c5c2d2b329
Fixing the separation of non-pushable circular bodies
2022-12-13 01:56:23 +00:00
samme
995edbbe85
Add maxSpeed
and useDamping
to physics group config
2022-11-23 09:06:44 -08:00
Richard Davey
4bd64129e9
Only checkWorldBounds in Body.reset if the Body collides with it
2022-10-11 01:45:21 +01:00
Richard Davey
d68b0b7c91
Merge pull request #6155 from ef4/better-closest-type
...
Improve types for ArcdePhysics.closest
2022-10-10 14:50:36 +01:00
Richard Davey
023343c789
All events have a type of string. Fix #6136
2022-09-21 22:01:03 +01:00
samme
d40b084063
Destroy debugGraphic also
2022-08-18 17:25:32 -07:00
Richard Davey
13b6598558
The Physics.Arcade.Body.reset()
method will now call Body.checkWorldBounds
as part of the process, moving the body outside of the bounds, should you have positioned it so they overlap during the reset. Fix #5978
2022-07-28 18:35:56 +01:00
Richard Davey
c47a40ba97
Working through making Body a passable type
2022-07-04 18:44:10 +01:00
Richard Davey
ec8f20b692
Swap the handler type and fixed staticBody
2022-07-04 16:40:13 +01:00
Richard Davey
132ab9cdbd
Added isBody
property
2022-07-04 16:39:53 +01:00
Richard Davey
6b55ac6b06
Made gameObject optional
2022-07-04 15:55:14 +01:00
Richard Davey
284277887f
Added body and staticBody methods
2022-07-04 15:55:07 +01:00
Richard Davey
20c597738f
Made gameObject optional and added setGameObject method
2022-07-04 15:54:53 +01:00
Edward Faulkner
0791302699
Improve types for ArcdePhysics.closest
...
This uses generics so that the return type from closest() is narrowed to match whatever type you passed in for the eligible targets.
Resulting typescript diff:
```diff
--- a/types/phaser.d.ts
+++ b/types/phaser.d.ts
@@ -70565,7 +70565,7 @@ declare namespace Phaser {
* @param source Any object with public `x` and `y` properties, such as a Game Object or Geometry object.
* @param targets The targets.
*/
- closest(source: any, targets?: Phaser.Physics.Arcade.Body[] | Phaser.Physics.Arcade.StaticBody[] | Phaser.GameObjects.GameObject[]): Phaser.Physics.Arcade.Body | Phaser.Physics.Arcade.StaticBody | Phaser.GameObjects.GameObject;
+ closest<Target extends Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody|Phaser.GameObjects.GameObject>(source: Phaser.Types.Math.Vector2Like, targets?: Target[]): Target | null;
/**
* Finds the Body or Game Object farthest from a source point or object.
(END)
```
2022-06-25 17:00:02 -04:00
Richard Davey
4f005e3701
The Arcade Physics World.enableBody
method will now only create and add a Body
to an object if it has the Transform component, tested by checking the hasTransformComponent
property. Without the Transform component, creating a Body would error with NaN values, causing the rest of the bodies in the world to fail.
2022-05-31 18:15:41 +01:00
Richard Davey
0e09776bd5
Added tileFilterOptions property
2022-05-26 18:54:55 +01:00
Richard Davey
aedf666ffc
Testing filterOptions to avoid needless iterations
2022-05-25 21:01:30 +01:00
Richard Davey
c45caa86df
JSDoc fix
2022-05-25 21:01:12 +01:00
Richard Davey
1020f72e4b
Fixed type
2022-05-10 18:07:17 +01:00
Richard Davey
59fbcc5ca3
Updated copyright year
2022-02-28 14:29:51 +00:00
Richard Davey
7aa7187a0f
Merge pull request #5870 from samme/docs/class-types
...
Add GroupClassTypeConstructor and ParticleClassConstructor types
2022-02-28 13:53:39 +00:00
samme
3ab43f56f6
Revert "Skip intersects check by argument"
...
This reverts commit d80e4f5824
.
2021-12-23 10:55:23 -08:00
samme
6dc89a4596
Docs: namespace ArcadePhysicsCallback
2021-11-21 20:23:31 -08:00
Richard Davey
950ba75bfc
Updated jsdocs
2021-11-02 14:02:46 +00:00
samme
52e402e14e
Docs: add Phaser.Types.GameObjects.Group.GroupClassTypeConstructor
2021-10-13 13:22:54 -07:00
Richard Davey
a4d8c9be47
Fix #5759
2021-09-28 15:21:13 +01:00
Richard Davey
d70b149170
Merge pull request #5793 from samme/fix/separate-tile-update-center
...
Update body center after tile separation
2021-09-22 11:01:28 +01:00
Richard Davey
f0eb694166
Merge pull request #5763 from samme/fix/group-double-collide
...
Do physics group vs. self collisions without the RTree
2021-09-21 11:44:52 +01:00
Richard Davey
2546096b64
Fixed JSDocs. Close #5836
2021-09-21 11:33:01 +01:00
samme
214a19fb7a
Update body center after tile separation
2021-07-28 09:57:54 -07:00
samme
abfb8c6d7d
Collide group vs self as array
...
Fixes #5758
2021-06-29 10:46:57 -07:00
Richard Davey
f001d6db2e
Merge pull request #5577 from samme/patch-6
...
Docs: damping in Phaser.Physics.Arcade.Body#drag
2021-03-01 16:39:47 +00:00
Richard Davey
d22e3567c7
Fixed a conditional bug in Arcade Physics ProcessX
when Body2 is Immovable and Body1 is not
2021-02-25 14:40:34 +00:00
samme
ea7a9aa132
Docs: damping in Phaser.Physics.Arcade.Body#drag
2021-02-23 09:53:42 -08:00
Richard Davey
cbe1a3219a
JSDoc improvements
2020-12-14 13:33:42 +00:00
Richard Davey
28d925b875
JSDoc fixes
2020-11-23 15:06:45 +00:00
Richard Davey
417f7684c3
More integer to number changes
2020-11-23 10:32:00 +00:00
Richard Davey
02c34cd64e
Replace integer with number
2020-11-23 10:22:13 +00:00
Richard Davey
d397551b3d
Merge pull request #5391 from samme/fix/overlapR
...
Set Arcade.Body#overlapR in separateCircle()
2020-11-09 17:10:18 +00:00
Richard Davey
ca8f201e8a
Merge pull request #5388 from samme/feature/scale-damping
...
Scale damping by the physics step delta
2020-11-09 17:07:30 +00:00
Richard Davey
6c69cf3627
Merge pull request #5387 from samme/docs/static-body
...
Docs: StaticBody#touching etc.
2020-11-09 17:06:57 +00:00
Richard Davey
bbb397c860
Merge pull request #5350 from samme/feature/worldstep-event-delta
...
Add delta argument to WORLD_STEP event
2020-11-09 17:05:37 +00:00
samme
956f880fa4
Set overlapR in separateCircle()
2020-11-08 09:19:53 -08:00
samme
4185e661d7
Docs: banish StaticBody touching properties
...
Fixes #5381
2020-11-07 10:04:28 -08:00
samme
be558d2dca
Scale damping
2020-10-22 13:59:49 -07:00
Richard Davey
675e43350d
Physics.Arcade.Body.setDamping
is a new method that allows you to set the useDamping
property of a Body in a chainable way. Fix #5352
2020-10-16 17:57:26 +01:00