flame-engine / flame

A Flutter based game engine.
https://flame-engine.org
MIT License
8.98k stars 879 forks source link

DraggableBox from forge2d examples does not follow the cursor smoothly. #3203

Closed ksokolovskyi closed 1 week ago

ksokolovskyi commented 1 week ago

What happened?

When dragging DraggableBox it does not follow the cursor smoothly. When the box can move in both the X and Y axes, its movement becomes even more unpredictable.

The recordings of the mentioned behavior are present below:

GearJointExample
PrismaticJointExample
PulleyJointExample
RopeJointExample

What do you expect?

DraggableBox smoothly follows the cursor.

How can we reproduce this?

The behavior described can be reproduced in the following examples:

What steps should take to fix this?

No response

Do have an example of where the bug occurs?

No response

Relevant log output

No response

Execute in a terminal and put output into the code block below

Output of: flutter doctor -v

Affected platforms

All

Other information

No response

Are you interested in working on a PR for this?

spydon commented 1 week ago

It runs smoothly in the examples for me, like one would expect it to move with the MouseJoint. Since you've indicated that you want to work on this, what changes would you like to make?

ksokolovskyi commented 1 week ago

Hi @spydon, thanks for your quick response. I opened PR https://github.com/flame-engine/flame/pull/3204 addressing this issue.