Skip to content

Commit

Permalink
Clarified collision messages (#404)
Browse files Browse the repository at this point in the history
* update

* image properties

* update editor

* defold sdk update

* animation updates

* animation fix

* run as admin

* update bob

* update about AndroidX support

* software render

* linux-faq.md update

* 4.28.2021 updates

* Basis Universal format

* sound & mesh

* gamepad event mapping

* admob url

* Minor edit to building blocks intro text

* update gamepad & ios

* project settings

* libffi version

* scaling

* image compression

* update gamepads

* increase memory

* caching assets

* update 2021/10/6

* update 2021/10/16
blend-modes.md

* update 2021/11/12

* allow dynamic transforms update

* Bundle update

* update faq

* bullet & bob

* script properties update

* editor-styling

* build server url

* editor templates

* spine extension update

* Fix typo in the "optimizations" word in Chinese docs

* Update to material.md - Constants buffers

* Verify Graphics Calls

* H5 parameters

* OpenJDK downloads

* cn update corresponds to [pull 259](#259)

* application security

* porting guidelines

* update for 8f1651f

* cn update for 094bf6f

* cn update for 20fdfc5 & 6263317

* cn update for 7/19/2022

* title

* profiling update

* update editor.md

* update bob.md

* update shortcuts

* update fixed update note

* Update properties.md

* Update material.md

* Updates links

* Update bob help with the latest info

* camera & renderer

* Updated android keystore info zh_cn

* bundling.md release vs debug zh_cn

* update bob.md & gui-clipping.md

* contentless bundle

* consoles update

* model animation link

* gamepad & faq

* remove a camera lib

* font shadow render mode fix

* updates about app-manifest and others

* Update script.md

* includes in shaders

* editor scripts

* material updates

* Added dynamic atlas and texture creation

* fixes for atlas and some others

* update screenshots and add explanations (CN)

* add a line about Dynamic Prototype (CN)

* remove "inline" marks in pics

* de-translate the subtitle "Running the debugger" & images fix

* bundle identifier restrictions

* node properties Enabled and Visible (CN)

* release checklist & slice-9

* Update project-settings.md (CN)

* Update camera.md (CN)

* Update project-settings.md (CN)

* culling of meshes (CN)

* Update project-settings.md (CN)

* gltf model file support (CN)

* updates about factory (CN)

* Update bob.md (CN)

* Update bob.jar help (CN)

* Update about renderer and other things

* Update PS4 development and other things

* Dynamic prototype part of the collection factory.

* sync to atlas.md

* sync to design.md

* sync to gpgs.md

* sync to hot-reload.md

* sync to linux.md

* sync to live-update.md

* sync to lua.md

* sync to networking.md

* sync to physics-shapes.md

* sync to push.md

* sync to test.md

* sync to working-offline.md

* update material.md

* update zerobrane.md

* all done

* Splitting .zip archives in live-update.md

* manual for collision events

* Updated sprite documentation to include info about multiple textures

* update editor-scripts.md & physics-events.md

* update buffer.md & physics-shapes.md

* screen blend mode

* Update camera manual for zh with new function.

* Fix texture profile documentation for 1.7.0 zh

* update material.md & render.md

* notice about physics-events

* script-properties notes & PS5

* Clarified collision messages
  • Loading branch information
CocosGames authored Mar 4, 2024
1 parent 2846f93 commit c02fdb4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/zh/manuals/physics-messages.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ brief: 当两个碰撞对象接触, 引擎会向这两个对象上的所有组

# 碰撞消息

当两个碰撞对象接触, 引擎会向这两个对象上的所有组件广播碰撞消息:
当两个碰撞对象接触, 引擎会向这两个对象广播碰撞消息:

## 碰撞响应

所有碰撞物体都会收到 `"collision_response"` 消息. 消息包含如下内容:
如果碰撞一方是 "dynamic", "kinematic" 或 "static" 类型时会收到 `"collision_response"` 消息. 消息包含如下内容:

`other_id`
: 另一个碰撞物的id (`hash`过的)
Expand Down Expand Up @@ -37,7 +37,7 @@ end

## 碰撞点响应

如果碰撞一方是 dynamic 或 kinematic 对象, 那么它会收到 `"contact_point_response"` 消息. 消息包含如下内容:
如果碰撞一方是 dynamic 或 kinematic 对象, 而另一方是 "dynamic", "kinematic" 或 "static" 类型时, 会收到 `"contact_point_response"` 消息. 消息包含如下内容:

`position`
: 接触点世界坐标 (`vector3`类型).
Expand Down Expand Up @@ -91,8 +91,7 @@ end

## 触发器响应

作为 "trigger" 类型的碰撞对象会收到 `"trigger_response"` 消息.
触发器与碰撞对象接触时会收到 `"collision_response"` 消息. 而且, 接触开始和结束时都会收到 `"trigger_response"` 消息. 消息包含如下信息:
如果碰撞一方是 "trigger" 类型则会收到 `"trigger_response"`. 碰撞开始时和碰撞结束时都会发送一次消息. 消息包含如下内容:

`other_id`
: 另一个物体的id (`hash`过的).
Expand Down

0 comments on commit c02fdb4

Please sign in to comment.