Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(example): DraggableBox does not follow the cursor smoothly (#3204)
This PR makes the `DraggableBox` movement more smooth and predictable by: 1) adjusting `FixtureDef` and `MouseJointDef` parameters 2) setting the `MouseJoint` target to `game.screenToWorld(event.deviceEndPosition)` rather than `event.localEndPosition` Fixes #3203 The comparison recordings are presented below: <details closed><summary>GearJointExample</summary> | BEFORE | AFTER | |----------|----------| | <video src="https://github.com/flame-engine/flame/assets/30288967/8188ed18-e0aa-4c0f-a6c4-092015ba471c"> | <video src="https://github.com/flame-engine/flame/assets/30288967/2388bf23-ab32-43a8-af88-a974687b6901"> | </details> <details closed><summary>PrismaticJointExample</summary> | BEFORE | AFTER | |----------|----------| | <video src="https://github.com/flame-engine/flame/assets/30288967/80ca56cd-7b7c-4a12-a551-37f268011bb0"> | <video src="https://github.com/flame-engine/flame/assets/30288967/aaae0f7d-230b-47db-a1c2-cc39cace74e7"> | </details> <details closed><summary>PulleyJointExample</summary> | BEFORE | AFTER | |----------|----------| | <video src="https://github.com/flame-engine/flame/assets/30288967/1d40b0a0-57d2-444e-a324-63112548f9e3"> | <video src="https://github.com/flame-engine/flame/assets/30288967/6deb1226-0f96-440f-ba72-14806612bd32"> | </details> <details closed><summary>RopeJointExample</summary> | BEFORE | AFTER | |----------|----------| | <video src="https://github.com/flame-engine/flame/assets/30288967/60b2ceee-4a41-4443-a2db-de5515270f18"> | <video src="https://github.com/flame-engine/flame/assets/30288967/c06e35ff-2c59-4a02-b6bb-7611817a76c0"> | </details>
- Loading branch information