You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/manuals/physics-events.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
title: Collision events in Defold
3
-
brief: Collision event handling can be centralized by using `physics.set_listener()` to direct all collision and interaction messages to a single specified function.
3
+
brief: Collision event handling can be centralized by using `physics.set_event_listener()` to direct all collision and interaction messages to a single specified function.
4
4
---
5
5
6
6
# Defold Physics Event Handling
7
7
8
-
Previously, physics interactions in Defold were handled by broadcasting messages to all components of colliding objects. However, starting with version 1.6.4, Defold offers a more centralized approach through the `physics.set_listener()` function. This function allows you to set a custom listener to handle all physics interaction events in one place, thereby streamlining your code and improving efficiency.
8
+
Previously, physics interactions in Defold were handled by broadcasting messages to all components of colliding objects. However, starting with version 1.6.4, Defold offers a more centralized approach through the `physics.set_event_listener()` function. This function allows you to set a custom listener to handle all physics interaction events in one place, thereby streamlining your code and improving efficiency.
9
9
10
10
## Setting the Physics World Listener
11
11
@@ -19,7 +19,7 @@ Here is an example of how to set a physics world listener within a collection pr
19
19
functioninit(self)
20
20
-- Assuming this script is attached to a game object within the collection loaded by the proxy
21
21
-- Set the physics world listener for the physics world of this collection proxy
0 commit comments