Commit Graph

45 Commits

Author SHA1 Message Date
jiaxin.lai 34c8e6650d Physics builtin (#4547)
* Rename built-in-*** to builtin-***

* Rename r to radius and c to center;

* Add method : transkateAndRotate & setScale to obb & sphere;
Delete unneed class box in box.ts file

* Fix builtin physics Bug of #751 & Modify the physics relative component

* Add macro condition, some method is not declare in builtin

* Rename CC_PHYISCS_*** to CC_PHYSICS_***;

* rename BuiltIn*** to Builtin***

* Typing intersect
2019-06-05 10:27:09 +08:00
jiaxin.lai 4cbd3e63f2 split box\sphere collider component from base collider component (#4541) 2019-06-03 19:26:43 +08:00
jiaxin.lai 0d0838770b Fix physic component (#4490)
* Fix physic component

* rename ' _triggered ' to ' _isTrigger ' in rigid-body-component

* Code stylized
2019-05-24 16:57:04 +08:00
jiaxin.lai c98f25d53e remove the collider body from world When the collider has shape only (#4470)
* remove the collider body from world When collider has shape only;
set body group default value to 1;

* Add declare for phyiscs macro
2019-05-22 14:07:57 +08:00
jiaxin.lai eaa5edb199 Adjusting mask of body,add note for interface (#4402) 2019-05-11 22:53:13 +08:00
jiaxin.lai 45c1c12ab5 Add group&mask to rigidbody (#4399) 2019-05-10 08:44:46 +08:00
jiaxin.lai 693b994857 Collision events are subdivided into ' Enter ', ' Stay ', ' Exit ' three states (#4391) 2019-05-09 17:12:05 +08:00
jiaxin.lai a2743c427f Fix bug of "Overwriting 'destroy' function in 'cc.ColliderComponentBase' class without calling super is not allowed. Call the super function in 'destroy' please" (#4367) 2019-05-05 14:22:52 +08:00
Leslie Leigh 4756973818 do not auto calculate bounds (#4342)
* do not auto calculate bounds

* fix ccclass error
2019-04-30 10:53:37 +08:00
jiaxin.lai 96995cca91 Fix physics component destory bug (#4334) 2019-04-28 19:40:15 +08:00
jiaxin.lai c92eaf9807 Scaling of sync physical shape and node (#4318) 2019-04-26 18:35:56 +08:00
jiaxin.lai 081867183a fix bug: "BoxCollider 优先级必须高于 RigidBody" (#4270) 2019-04-23 13:06:25 +08:00
jiaxin.lai 7e71494806 Fix collider & rigid body component enabled property (#4249) 2019-04-19 15:25:38 +08:00
jiaxin.lai 1982751da3 Adjustment modules to avoid circular reference , split 'enum' type from 'instance.ts' , add to 'physics-enum.ts' (#4235) 2019-04-17 19:27:59 +08:00
jiaxin.lai 0609c58a9d Fix problems where physics and scene synchronization are different (#4224) 2019-04-15 20:25:26 +08:00
jiaxin.lai 5a0b49ac25 fixes applyForce and applyImpulse function call error, modify shape and body construct order (#4195) 2019-04-12 09:49:44 +08:00
jiaxin.lai 449e7640dc Construct a rigid body should be before the user script can access the rigid body (#4189) 2019-04-11 14:54:51 +08:00
jiaxin.lai 6b37a78897 rigidbody depends on colider, so rigidbody should be executed later than colider (#4186) 2019-04-10 15:45:31 +08:00
jiaxin.lai abc2d65da1 fixes UseGravity property in rigidbody component (#4165) 2019-04-08 18:14:45 +08:00
jiaxin.lai 3bb398a31f Fix a problem where the physical system collision event does not trigger because of automatic sleep, adding a trigger property to the collider component (#4158) 2019-04-08 14:35:23 +08:00
Leslie Leigh 682c9d19dc Leslie (#4103)
* physics system use fixed frame-rate

* wakeup bodies before apply force and impulse
2019-03-26 00:12:28 +08:00
Leslie Leigh e5c94a04a8 fix bug (#4055) 2019-03-18 16:20:33 +08:00
Leslie Leigh a2416ba312 normalize the RaycastResult; allow rigidbody to sleep to prevent shake (#4028) 2019-03-13 18:21:15 +08:00
Leslie Leigh dcfb485d69 fix ammo-impl bugs (#3997) 2019-03-11 17:32:16 +08:00
Leslie Leigh b7869b595d restructure physics (#3985) 2019-03-08 11:30:14 +08:00
Leslie Leigh 1c967ed52f modify CCNodePool, change rigidbodycomponent implement (#3979) 2019-03-07 15:19:57 +08:00
Leslie Leigh 2b3a26ec7d modify default friction to 0; add api applyImpulse (#3972) 2019-03-06 15:55:04 +08:00
Leslie Leigh 19c390b8d9 modify default physics material (#3970) 2019-03-06 09:15:48 +08:00
Leslie Leigh dee10308a4 fix when use uint32arrat as index buffer (#3961)
* fix when use uint32arrat as index buffer

* add collide event
2019-03-05 10:27:15 +08:00
Leslie Leigh 8f9e5534d1 fix phys comp removal error (#3943)
* collider removal

* bug fix

* fix name
2019-03-01 18:25:07 +08:00
Leslie a83b1a7bdf remove PhyscisBody, PhysicsShape concepts, directly use RigidBodyComponent, CollidersComopnent; add Constraints. 2019-02-22 14:41:22 +08:00
Leslie 16a74d471f fix multi-vertex-buffers mesh bug; remove _cc, use cc.internal instead; fix wireframed() function; fix component's onDisable bug. 2019-02-18 18:20:01 +08:00
Leslie bb64cba835 change root index.js to index.ts, add some physics api, transform plane to ts 2019-02-14 18:40:39 +08:00
Yun Hsiao Wu 3e8eb35072 misc bugfix and restructure 2019-01-23 11:04:19 +08:00
Yun Hsiao Wu 74fe021641 misc fix 2019-01-21 21:54:44 +08:00
Yun Hsiao Wu f099e500c3 node & camera refactor 2019-01-10 20:07:22 +08:00
Yun Hsiao Wu d76d93fae1 merge origin 2019-01-08 17:14:17 +08:00
Yun Hsiao Wu e1d84783a4 Merge branch '3d' of https://github.com/cocos-creator/engine into gfx 2019-01-08 16:56:38 +08:00
Yun Hsiao Wu 06eb5d8060 fix tsc errors 2019-01-08 16:38:26 +08:00
Leslie Leigh 4fa9f07f33 auto pull transform when node rebind to body or body added to world. (#3706) 2019-01-07 14:20:19 +08:00
Leslie Leigh f10fbdf265 fix exports/add triple directive (#3717) 2019-01-07 12:41:24 +08:00
Leslie Leigh 6050a2aefc donot use global namespace Vec3, use import instead; fix wrong import head (#3716)
* donot use global namespace Vec3, use import instead

* fix wrong import head

* fix module bits export
2019-01-04 19:24:45 +08:00
Leslie Leigh 4488d0d363 Vmath (#3700)
* * do not run phy system in editor
* support center of phy shape
* fix setWorldPosition() bug

* add interface pullTransform() for sync dynamic phy body's transform

* rename to ts

* remove type in jsdoc annotation

* set indent to 4

* tslint auto fix

* tslint auto fix

* update bits.ts

* update package.json;update vecs, quat and util.

* correct exporting/importing in index.js/export renderer as non-default because dumplicated Scene export

* components exporting
2019-01-03 18:50:17 +08:00
Leslie Leigh cf180d57d9 do not run phy system in editor;support center of phy shape;fix setWorldPosition() bug (#3690)
* * do not run phy system in editor
* support center of phy shape
* fix setWorldPosition() bug

* add interface pullTransform() for sync dynamic phy body's transform
2019-01-02 16:51:01 +08:00
Leslie Leigh 3ed9edfbc6 phy framework (#3644)
* phy framework

* phy mat

* framework/index.ts

* a node can have more than one collider

* rename physical to physics

* fix

* fix

* support mix ts js

* fix

* fix problems in issue

* fix

* remove RigidBodyType, add DataFlow

* useGravity, freezeRotation, isKinematic

* raycasts

* fit buildin-world raycast options

* add contact material

* lint

* add rigid-body-component.ts

* some improvements

* improvements

* fix bug
2018-12-27 12:03:10 +08:00