Bullet Behavior movement with unexpected Offset

Bugs will be moved here once resolved.

Post » Fri Sep 05, 2014 7:28 pm

Problem Description
_ With Bullet Behavior there's an offset to upward/downward angle movements (90º / -90º).

Attach a Capx
_ https://www.dropbox.com/s/fluanpo50qwek ... .capx?dl=0

Description of Capx
_Simple Sprite with bullet behavior over a background.

Steps to Reproduce Bug
  • Just press up a couple of times. Change the angle to see how the upwards and downwards angles offsets the sprite.

Observed Result
_Press Up and you should see the sprite moving upward with varied offset to the right. But should go stright up.
Happens with 90º and -90º (also with 270º). But works fine with any horizontal degree like 180º , 360º and 0º.

Expected Result
_Angles like 90º, -90º and 270º should move a sprite in stright vertical lines without offsets. (With bullet behavior movements)

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

Operating System and Service Pack
_Windows 7 x64 SP1 (all updated along with any drivers) _

Construct 2 Version ID
_r179 _
_r178_ (happened in this version too)
B
31
S
4
G
4
Posts: 110
Reputation: 4,593

Post » Fri Sep 05, 2014 10:14 pm

You have to set the bullet speed before setting the angle of motion. If you set the angle of motion when the bullet speed is 0 it has no effect (angle stays at 0) .
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,650

Post » Sat Sep 06, 2014 3:12 pm

Wow! I always set first the angle and then the speed. Never played with direct angles like now so i probably never saw this kind of offset behavior before. I get carried away with a recent bugfix about pixel rounding giving bad offsets by 1 pixel and.. it was my stupidity all along..

Thanks @ramones ! I tested it and worked fine now. I wonder why i didn't tried this simple change myself grrr.

By the way, if you set "angle(sprite1.x,sprite1.y,Sprite2.x,Sprite2.y)" as the angle and then set the speed it seems to work fine that way. I better correct those errors anyway before they explode on me.

Thanks again! This "bug" is solved.
B
31
S
4
G
4
Posts: 110
Reputation: 4,593

Post » Tue Sep 09, 2014 1:58 pm

Closing, link is 404 and thread replies imply there is not a bug.
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 1 guest