Question about broken predictive aim on Turret Behavior

Discussion and feedback on Construct 2

Post » Thu Jun 19, 2014 2:51 pm

Hi! I created a turret today and notice something. I have predictive aim enabled. When I just create the bullet (with bullet behavior) on the "On Shoot" action it creates the bullet and rotates it so it faces the target. But somethis this looks odd when it takes a whil to travel to the target, when it arrives the angle looks just wrong.
I tried to "fix" this with my own "Set Angle toward" action. But it seems as soon as I enable this line after the creation of the bullet the predictive aim gets broken. Is this intended?
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
56
S
17
G
6
Posts: 748
Reputation: 9,420

Post » Thu Jun 19, 2014 3:38 pm

In my experience, a turret firing a bullet sprite will create that sprite at whatever the angle the turret is facing.

Predictive aim with the same speed as the bullet sprite's bullet.speed will therefore rotate the turret to be pointing in front of a target.

Thus, when a bullet sprite is created, its angle is pointing to where the target will be when it travels there and collide moments later. I don't have a problem with angles and what not.

Do you just spawn the sprite with bullet behavior On Shoot, or you add a angle correction following spawning the sprite as well?
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Thu Jun 19, 2014 4:06 pm

I had an angle correction but it seemed that many shots missed. After disabling it more bullets hit the moving target (at least it seems so).
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
56
S
17
G
6
Posts: 748
Reputation: 9,420

Post » Thu Jun 19, 2014 6:04 pm

Hi Bl4ckSh33p,

To have an accurate predictive aim, make sure that your "Projectile Speed" (of the Turret) is exactly same as the "Speed" of the Bullet. Also, the maximum rotation speed of the turret should be enough for it to (pre)aim at the target quickly.

Let me know if that works.
B
10
S
2
Posts: 109
Reputation: 982

Post » Thu Jun 19, 2014 8:47 pm

Hi. The Speed is already set at the same value but I will take a look at the rotation speed and try different settings, thanks.
Bl4ckSh33p-Soft - Custom Software and Indie Games
B
56
S
17
G
6
Posts: 748
Reputation: 9,420


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests