Physics objects with collision polygons drift off course

Bugs will be moved here once resolved.

Post » Thu Jul 13, 2017 3:10 pm

Problem Description
When applying force to a physics object that also uses a collision polygon, the object will not move in the exact direction that it should. How noticeable this drifting effect is depends on the angle you are moving at.

This is not an issue if the object uses a bounding box or circle for collision detection.

Attach a Capx ... XBzbGRKOTA

Description of Capx
Puts you in control of a ship which will rotate toward the cursor. Hold "W" to apply force in the direction the ship is facing. There is a background grid which will allow you to easily recognize how the ship is moving in relation to its surroundings.

Steps to Reproduce Bug
  • Step 1 Move in any direction. It is most noticeable when trying to follow a grid line up or down.

Observed Result
The ship drifts off course, or follows parallel to the course it should be taking.

Expected Result
The ship should move in a straight line toward the cursor, without drifting in either direction. To see how the ship should be moving, change the collision mask to circle or bounding box.

Affected Browsers
  • Chrome: (YES)
  • FireFox: (YES)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 8.1

Construct 2 Version ID
(This has been an issue in previous versions as well.)
Posts: 49
Reputation: 3,975

Post » Fri Sep 15, 2017 2:09 pm

We need a .capx project, not an exported project, as described in the bug report requirements. Closing.

Please note if you use a non-symmetrical collision polygon, the center of gravity will be off-center and the result you describe is the correct outcome.
Scirra Founder
Posts: 25,097
Reputation: 199,802

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests