Sprite Spawned From Wrong Place

Bugs will be moved here once resolved.

Post » Tue May 24, 2016 8:11 pm

Problem Description
Sprite is spawned from left side of other sprite instead of the specified image point.

Attach a Capx
https://onedrive.live.com/redir?resid=4 ... ile%2ccapx

Description of Capx
A red sprite spawns (shoots) a blue sprite from its origin every 0.5 seconds.


Steps to Reproduce Bug
  • Step 1: Drag the red sprite to the left as if you tried to push it off screen. The red square is bound to layout
  • Step 2: Move the red sprite up and down as you try to push it off screen

Observed Result
The red sprite spawns a blue sprite from its left side.

Expected Result
The red sprite should shoot a blue sprite from its origin.

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

Operating System and Service Pack
Windows 8

Construct 2 Version ID
R227 (64 bit)
B
11
S
2
Posts: 38
Reputation: 709

Post » Wed May 25, 2016 11:38 am

Closing as won't fix: the problem is the "Bound to layout" behavior does its clamping after the events run, so it works in this order:

1. drag-and-drop moves object outside layout
2. event fires and spawns object
3. bound-to-layout moves object back inside layout

Changing this order will doubtless break other projects that depend on things working this way, so we can't really change it. It should be straightforwards to work around if you just do the layout bounding in events instead of with the behavior.
Scirra Founder
B
402
S
238
G
89
Posts: 24,637
Reputation: 196,061

Post » Wed May 25, 2016 12:41 pm

Yes, I have worked around it already, just wanted to inform you just in case.
Thanks
B
11
S
2
Posts: 38
Reputation: 709


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 1 guest