[Solved] How to shot at a exactly point of enemy?

Hi, I have problem here. please take a look at image bellow. how do I exactly shot at the center point of enemy?

I have tried to set the fire bullet toward position and set the position at enemy center point, but it do same thing, where the bullet throw at the bottom of the enemy. I have also set the fire bullet toward angle but it do the same thing.

fire bullet

looks like the dagger are not hit the enemy. here is my event. the dagger/bullet point and enemy point.



zombies center and origin

I have tried it manually and it works perfectly, using create object and permanent force toward object.


result
preview manual

but I want to use the firebullet add on behavior.

Hi, I tried what you did with the fire bullet extension and I have no problem. I would suggest to close and restart Gdevelop. If this does not work, I would deinstall the extension and install it again or, if this is also not working, I would load and install everything in a new scene.

I don’t believe Drona logic of removing the extension and/or reinstalling everything is going to help.

By default, a sprite has 2 points, The first is it origin and second it’s center, you’ll want to target the enemies center point with the bullet extension.

Try something like the below ( using .CenterX() and .CenterY() )

thanks for your reply, I have tried to targeted the center point but it didn’t work.

I’ve tried to delete the behavior and install it again, but it didn’t work. I’ve also tried to make new scene but didn’t work.

Yeah,I wouldn’t call it logic. It is admittedly a rather helpless attempt to get something running that should work. I made a test project and shooting at the enemy was no issue. You can shoot at positions or objects etc. and for the object-option there is no point you need to specify and it behaves as expected.

Then, unfortunately I cannot tell you what the problem is, I can only confirm that for me the behaviour works as intended.

I think something wrong with Gdevelop, maybe the file just corrupt or something. I make new file and it work perfectly.

1 Like