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
GearJointExample
| BEFORE | AFTER |
|----------|----------|
| PrismaticJointExample
| BEFORE | AFTER |
|----------|----------|
| | |
PulleyJointExample
| BEFORE | AFTER |
|----------|----------|
| | |
RopeJointExample
| BEFORE | AFTER |
|----------|----------|
| | |
Description
This PR makes the
DraggableBox
movement more smooth and predictable by: 1) adjustingFixtureDef
andMouseJointDef
parameters 2) setting theMouseJoint
target togame.screenToWorld(event.deviceEndPosition)
rather thanevent.localEndPosition
Fixes https://github.com/flame-engine/flame/issues/3203
The comparison recordings are presented below:
GearJointExample
| BEFORE | AFTER | |----------|----------| |PrismaticJointExample
| BEFORE | AFTER | |----------|----------| |PulleyJointExample
| BEFORE | AFTER | |----------|----------| |RopeJointExample
| BEFORE | AFTER | |----------|----------| |Checklist
docs
and added dartdoc comments with///
.examples
ordocs
.Breaking Change?
Related Issues