Skip to content

Commit 2b3c617

Browse files
authored
Update README.md
1 parent a047220 commit 2b3c617

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,17 @@ rope.addTo(app);
289289
}
290290
```
291291

292+
# Events
293+
## `collision`
294+
[Example](https://github.com/WhitestormJS/physics-module-ammonext/blob/master/src/modules/controls/FirstPersonModule.js#L39)
295+
296+
```javascript
297+
player.on('collision', (otherObject, v, r, contactNormal) => {
298+
if (contactNormal.y < 0.5) // Use a "good" threshold value between 0 and 1 here!
299+
canJump = true;
300+
});
301+
```
302+
292303
## FAQ
293304
**Q: My `ClothModule` doesn't work properly, what to do?**
294305

0 commit comments

Comments
 (0)