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
samme
90799f39ed
Docs: StaticBody#reset description
2023-08-22 08:48:01 -07: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
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
4e18d35098
Fixed doc types
2023-04-04 17:55:56 +01:00
Richard Davey
881d62075f
Remove console.logs. Fix #6420
2023-03-22 16:19:55 +00:00
Richard Davey
aa3e1d17ce
Updated documentation
2023-02-27 16:26:04 +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
Richard Davey
468bf7821d
Updated copyright year
2023-01-02 17:36:27 +00:00
Richard Davey
463b602608
Use getters
2022-12-27 16:56:05 +00:00
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