Bullet Behavior Bug

Bugs will be moved here once resolved.

Post » Thu Aug 04, 2016 3:12 am

Problem Description
Setting the bullet speed behaves more like a multiplier than a speed setting..

Attach a Capx
https://drive.google.com/file/d/0B_4xfu ... sp=sharing

Description of Capx
When setting the bullet speed to something negative, it behaves erratically.

Steps to Reproduce Bug
  • Open .capX.
  • Run.
  • Click on either button and watch its behavior.

Observed Result
When clicking the left arrow, multiple times, the bullet object switches directions, even though I am setting it to the same speed each time...

Expected Result
Setting a bullet speed should save as a constant variable, not a multiplier or whatever may be happening with this behavior

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

Operating System and Service Pack
Windows 10 Latest Service pack.

Construct 2 Version ID
r231
B
82
S
32
G
7
Posts: 281
Reputation: 10,675

Post » Thu Aug 04, 2016 3:25 am

So it's supposed to go negative speed?
Whats happening is that the behavior is designed to go by angles. Speed does not determine its direction.
As a default when you set the speed to a negative value it tells it to go the opposite direction.
When it goes the opposite direction it must have a positive speed, so that's what it uses.
Then when you tell it to go - speed it again thinks it's supposed to go the opposite direction.
Image ImageImage
B
168
S
50
G
164
Posts: 8,227
Reputation: 105,573

Post » Thu Aug 04, 2016 9:17 am

I see, I thought the variable would work like any other, negative speed would mean going in reverse of its current angle, as it already does, then setting it again to the exact same negative speed would keep it going in the same direction..like a constant....
B
82
S
32
G
7
Posts: 281
Reputation: 10,675

Post » Mon Aug 08, 2016 11:20 am

The Bullet behavior treats a "set speed" action as "calculate current angle then set magnitude of current movement at that angle". This has the effect of treating a negative speed as "point in the opposite direction then set a positive speed".

I agree it's a bit strange but I'm concerned about changing this since it could break existing projects that use that feature. It's also a pretty minor quirk IMO. So although the issue is probably valid, closing as won't fix.
Scirra Founder
B
387
S
230
G
87
Posts: 24,249
Reputation: 192,250

Post » Tue Aug 09, 2016 2:36 am

@Ashley Thanks for the honest feedback..
B
82
S
32
G
7
Posts: 281
Reputation: 10,675


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests