Commit Graph

14 Commits

Author SHA1 Message Date
Leslie Leigh (李的序) 5682bbf996 Use WebAssembly version libraries for unit testing (#16264)
* Use WebAssembly version libs in unit test
2023-09-19 10:52:16 +08:00
Leslie Leigh (李的序) 59c6afd7e5 Optimize physics unit test (#16262) 2023-09-15 14:07:07 +08:00
Ling Zhan 08d9a34457 character controller api tweaks (#15621)
* character controller api tweaks

* tweak
2023-07-05 15:28:18 +08:00
Ling Zhan bd2608bce7 [opt] cct api refactor (#15360)
* [opt] cct api refactor

* tweaks

* tweak
2023-06-08 12:22:27 +08:00
Yiwen 5330e7ee5a Configurable constraint (#14778)
* add support to configurable constraint

* add missing files

* update packages

* fix PhysX bugs,update error info

* fix exports, deserialization.

* just stage

* Revert "just stage"

This reverts commit 41dc157afec00bfeb077b12e64c45a951ab1f894.

* fix problems

* improve perf

* tweak

* fix merge errors

* update errormap
2023-05-19 11:28:09 +08:00
Ling Zhan 1032bd9508 Sweep Test (#15068)
* init

# Conflicts:
#	cocos/physics/physx/physx-adapter.ts

# Conflicts:
#	cocos/physics/physx/physx-adapter.ts

* init sweepBoxClosest

# Conflicts:
#	cocos/physics/physx/physx-world.ts

* back

* physx boxCastClosest works now.

* add physx sweepAll

* init bullet sweepBoxClosest. not test yet

* add bullet sweepBox

* bullet add internal functions: sweep/sweepClosest

* init physx c++ sweepBox/sweepBoxClosest

* add sweepSphere, sweepCapsule; add unit test.

* add sweep api doc

* revert physx asm/wasm loading func

* tweaks

* add error log for builtin and cannon.js

* builtin and cannon.js use warnid when calling sweep

* tweak api doc
2023-05-17 18:37:03 +08:00
Ling Zhan 9cd5212d18 Character Controller (#14848)
* back.boxCCT works now. capsuleCCT not collider correctly

* refactor

* cct 事件系统初步可用。todo 碰撞filter

* init cct group and mask

* queryFilterCB

* this the first working version

* tweaks

* init bullet character controller. todo: events, autoStep bug, maxSlope bug

* bullet cct onShapehit

* physx native works now. todo: BoxCharacterController

* add physx-native BoxCharacterController

* cct filters redundant events

* cct velocity

* cct detectCollision not working

* cct detectCollisions works in physx

* Character controller supports setDetectCollisions: collision detection without calling move()

* cct center

* bt.CharacterController_setContactOffset,CharacterController_setStepOffset,CharacterController_setSlopeLimit

* bullet cct collision event use last shoot

* tweaks

* cct doc

* fix bullet box-cct hit callback

* add cct export

* feat cct setOverlapRecovery

* cct delete useless code in native physics

* tweaks: cct remove useless code

* fix cct bullet group mask: update group and mask by re-adding cct to physics world. not tested

* tweaks

* tweaks

* fix bullet-cct not emit collision: add bullet updateNeedEmitCCTEvents

* tweaks

* fix cct supports enable/disable

* add cct imp null check

* cct not to expose detectCollisions and OverlapRecovery at this moment

* physx/bullet cct支持节点缩放.todo: bullet cct(setRadius/Height)还有bug 无法运行时改变,只能在初始化的时候设定。physx c++待支持。

* c++ physx cct supports node scale

* fix cct physics c++ forgets to remove cct from scene when destroyed

* [fix] physx cct set climbing mode to PxCapsuleClimbingMode.eCONSTRAINED

* add cct unit test and multiple tweaks

* multiple tweaks and add cct center for physx c++

* tweak

* tweaks

* tweaks

* external version: develop-20

* tweaks
2023-05-16 10:03:13 +08:00
Ling Zhan 3a0df15c31 [feat] in physics settings, default material is set through file (#13464)
* [feat] in physics settings, default material is set through file
2022-11-23 10:23:28 +08:00
minggo 95a76235b6 Adjust some files (#12910)
`cocos/core` should not depend other modules, so move some files out of `cocos/core`:
- move some files from `cocos/core` to `cocos/game`
  - director.ts
  - splash-screen.ts
  - game.ts
 - move `cocos/core/root.ts` to `cocos/root.ts` as there is not better module to contain `root.ts`.
 - move `cocos/core/platform/view.ts` to `cocos/ui/view.ts` as screen related logic is moved to `cocos/core/platform/screen.ts`
2022-09-28 09:34:35 +08:00
minggo 0d7c5c8f56 move cocos/core/scene-graph to cocos/scene-graph (#12868)
* move `cocos/core/scene-graph` to `cocos/scene-graph`
* move some files in `cocos/core/components` to `cocos/scene-graph`:
  - component.ts
  - component-event-handler.ts
  - component-event-handler-schema.ts
* move some files in `cocos/core/components` to `cocos/misc`: 
  - missing-script.ts
  - model-renderer.ts
  - renderer.ts
  - camera-component.ts
* move  `cocos/core/components/system.ts` to ``cocos/core/system.ts``
2022-09-26 11:02:22 +08:00
Santy-Wang 7bc135e1c7 adjust initialization process (#11143)
* adjust init process

* fix bugs

* restructure

* tweak

* delete useless code

* fix ci

* support more platform and fix some bugs

* mark internal

* tweak

* add docs

* add docs and little adjustment

* fix bugs

* adjust decorator execute order

fix mesh error

* fix bugs

* revert some change

* revert auto-generated code

* revert auto-generated code
2022-07-03 21:16:09 +08:00
pandamicro dba83c270d Fix multi blank lines (#11116) 2022-05-17 11:56:06 +08:00
jiaxin.lai b229ec7912 refactor for physics initilization and physx pvd (#9168)
* mnior refactor

* fix

* stash

* move register and init to engine inited event
2021-08-18 13:39:08 +08:00
jiaxin.lai 4cda45bfd9 physics unit-test and features base 3.3 (#9027)
* support ccd

* clearState after change type

* fix Instantiate rigid body with custom group

* add some extra functions

* update physics libs

* tweaks rigid body component

* add EVENT_UPDATE to PhysicsMaterial

* tweaks

* support switch physics backend

* remove redundant constants

* add config & min volume size

* update @cocos/physx to 1.0.4

* fix destroy cannon world

* correct init if manual construct physics system

* disable log info in test

* add some physics unit test

* add physics unit test

* make the config optional

* add runInEditor to selector

* pack physx js libs by default

* fix

* STASH

* stash

* tweaks

* rename

* update test

* support query trigger

* update @cocos/ammo to 1.1.6

* fix raycast with query trigger in physx

* raycast test with query trigger

* rename

* docs

* fix calculate local inertia (#8956)

* rename

* delete

* allow generate mesh/terrain collider at runtime

* tweaks

* use sap by default

* update @cocos/ammo to  1.1.8

* update @cocos/physx to 1.0.7

* update @cocos/cannon to 1.2.8

* update package-lock

* add ccd test

* remove config

* rename

* fix 2d phy sys typing

* support global allow sleep toggle for bullet

* tweaks

* use naive broadphase by default

* rename

* docs

* tweaks

* add missing jugement
2021-07-22 15:52:18 +08:00