Solid Collision Bug

Bugs will be moved here once resolved.

Post » Sat May 31, 2014 9:21 pm

Problem Description
When a flat solid moving on the X axis collides with a player (8 direction box sprite), the played is pushed backwards AND upwards (both X and Y axis). When both these objects collide the player should only be moving along the X axis.

Attach a Capx
Attached at the bottom of post.

Description of Capx
Rectangular solid moving forward every tick collides with box sprite with the 8 direction behaviour.

Steps to Reproduce Bug
Reproduced in Capx.

Observed Result
Box sprite is pushed upwards and backwards.

Expected Result
Box sprite should only be pushed backwards.

Affected Browsers
  • Chrome: Yes
  • FireFox: Yes
  • Internet Explorer: Yes

Operating System and Service Pack
Windows 7 SP1

Construct 2 Version ID
Release 168 (64-bit)
You do not have the required permissions to view the files attached to this post.
Posts: 37
Reputation: 1,278

Post » Mon Jun 02, 2014 4:14 pm

Closing as won't fix: since you use 'move at angle' and the 8 direction behavior, you are causing a conflict. Setting the position effectively teleports the object, and then the 8 direction behavior notices it has been wedged inside a solid without knowing how it got there. This causes it to use a last-ditch "get me out of here" algorithm which happens to use a spiral search for the nearest free space, which in this cause causes it to move both up and right. Workaround: use 'simulate control left' instead and it works correctly, since the 8 direction behavior then controls the movement, knows where it came from, and can handle the collision correctly.
Scirra Founder
Posts: 25,097
Reputation: 199,802

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests