Set speed modifies angle in Bullet Behavior

Bugs will be moved here once resolved.

Post » Thu Jun 27, 2013 3:05 am

If you set the speed AFTER you set the angle in bullet behavior, the angle will not be correct.
The workaround is setting the angle after the speed.


Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/11679107/BulletBug.capx

Steps to reproduce:
1. Create an Sprite
2. Enable Bullet Behavior
3. In any event, set angle to 90 and then set speed to any not zero.


Observed result:

The sprite movement angle will be 0

Expected result:

The movement angle should be 90

Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: yes
Safari for Windoes: yes

Operating system & service pack:
Windows 7 SP1

Construct 2 version:
136 and before    


   

B
6
S
1
Posts: 16
Reputation: 1,116

Post » Thu Jun 27, 2013 4:03 am

Add a Wait 0 seconds after setting Sprite 2's angle of motion. Although you shouldn't need to do that, it's a fix. Something with setting speed so quickly after setting AOM resets it/doesn't allow it to change. That should still be fixed none the lessEncryptedCow2013-06-27 04:33:00
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Thu Jun 27, 2013 4:51 am

It's not a bug, it's by design.
You can't have a movement angle if you don't have a speed to this movement.

@EncryptedCow: using a "wait 0 sec" action is always a bad idea and should be a "do not" when using C2.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
289
S
112
G
94
Posts: 7,333
Reputation: 69,293

Post » Thu Jun 27, 2013 4:55 am

@Kyatric How is it bad to use it? I use it quite often when I have to wait for the previous action to complete.
B
46
S
14
G
7
Posts: 603
Reputation: 8,106

Post » Thu Jun 27, 2013 11:14 am

The previous action is already complete by the time you get to the next action, so I would consider it bad practice to use it for that reason.
Scirra Founder
B
395
S
232
G
88
Posts: 24,368
Reputation: 193,746


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 5 guests