Addressing the precise instantiation problem

Hi,

When instantiating the candy sprite at the cannon’s “projectile” point, it doesn’t instantiate correctly, resulting in several errors.

How can I achieve this job?

thanks

It does
Your points are just wrong

Go to candy points and move origin point to center of candy

Hi,

Although I adjusted the point as instructed, the object still isn’t instantiating from the projectile’s origin.

Remember, the candy’s radius is 30.

Hi @SaeedP - i just tried quickly doing something similar in a project…

it did work fine and the only thing i can think of, (if your candy origin is in the center - which as zero says would have explained it) - is it a layers issue? …is the cannon on the ‘elements’ layer. see below the yellow spot in the middle is the cursor click!

projectile

If you increase the size and radius of the objects, you may encounter some problems.

Did you find anything specific in my post’s images, code, and the game?

The post illustrates the projectile’s origin and the candy’s 30-unit radius.

I do not know your ball’s radius.

To check if radius have anything to do with your issue simply move canon away from that wall and see where it spawns
Then is canon and candy on same layer?
And lastly

Gdevelop is case sensitive

You are right.

Thanks