Explain Bullet Behavior

Discussion and feedback on Construct 2

Post » Tue Mar 19, 2013 8:40 pm

Can someone explain the Bullet Behavior? I have read this (https://www.scirra.com/manual/90/bullet) and much more, but I am confused as to why when you insert a Sprite that the Sprite has to face East. I get that bullets travel East, unless you set an image point and then rotate the sprite, but I really don't get why. It appears that whatever direction the Grab Handle is facing is the direction of the bullet, Why?

Any help understanding the concept would be greatly appreciated. Thank you

Brettjbmoyer2013-03-19 20:41:36
B
21
S
7
G
1
Posts: 128
Reputation: 3,076

Post » Tue Mar 19, 2013 8:49 pm

Bullets work off of the objects angle. It just so happens that the angle for 0 is east, or that way->.
So if you want the bullet to travel down you would set its angle to anything below 179, and above 0, up, above 180, etc.

Image points have very little to do with it. However the hotspot has quite a bit to do with it, as it is the objects origin, or the xy that the system will use.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Post » Tue Mar 19, 2013 8:55 pm

I see that help tremendously. I was confused as to why the bullet was traveling in the facing direction of the gun, but it was because it was setup to spawn from the gun and therefore uses its angle. Wow, thanks.

Brett
B
21
S
7
G
1
Posts: 128
Reputation: 3,076

Post » Tue Mar 19, 2013 9:46 pm

Well , bret , there's an option in the bullet behavior options ( DUH ! )
That let's you disable this behavior ( Not the bullet behavior , the behavior of taking the object angle as an angle of motion ) you can set it to no and then you can controls the angle of motion with the action

"Set Angle of Motion"

Works very well , I remember ol' days when C2 was a new born :P
Didn't have those fancy options :D

Oh well , cheers ...
B
34
S
16
G
16
Posts: 2,222
Reputation: 16,564

Post » Tue Mar 19, 2013 10:45 pm

OUCH, (DUH). So I saw/see that "Set Angle" but its not clear what it does, based on what you say I understand but it doesn't respond or (DUH) does apply to me :)

I created a Sprite with Bullet and Set Angle to No, when I hit Run it still shoots off to the right.

Thanks
Brett
B
21
S
7
G
1
Posts: 128
Reputation: 3,076


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 3 guests