PointX still a thing?

Can I still refer to a custom point on a sprite with PointX() and PointY()? I see it referred to in old posts, etc, but the engine doesn’t seem to let me refer to them now.

You need the sprite name first.

Sprite.PointX(“hand”)

1 Like

Hello Keith. Thanks for your reply. The image above may not reflect it but I already tried that. Is it because this is for a 3D sprite?

Edit:
3D objects don’t have points.

It looks like it’s all caps.
I take that back.

Could there be a space after the period? Is the object a sprite. 3D objects don’t have points.

Some keyboard settings automatically add spaces after periods.

Hey, you need to add the name of the point in the expression.
ZombieWarlock.PointX(“PointName”)

Thank you. That’s what I assumed.

I have. It still doesn’t work. As Keith said, you can’t use points with 3D sprites. I’m not sure why. I’ll ask for the feature to be added.

Screenshot 2024-12-18 211347

Currently there’s no way to add points to a 3D object. You would need PointZ() as well.

I wish GDevelop had an easier way to deal with coordinates like vectors. It would be nice to be able to store x and y in a structure and just use set position (or whatever) to structure name.

1 Like

You can easily make your own offsets and then calculate the result. If you want to keep it real simple just store a single variable for the height. Spawn the object at Zombie.CenterX(), Zombie.CenterY(). Then adjust the height according to Zombie.ProjectileHeight or whatever you want to call it.

Hello. Yes, I am doing that. Unfortunately, the spell doesn’t spawn from the sprite’s hand but from the center of the body. Regardless, it’s better than nothing.

Yeah, to do that you would need to get the proper X and Y position as well. You could use the “put object around another” action. This places the object on X/Y using an angle and distance from the center. Something like Zombie.Angle() - 45 , at a distance of a little less than the radius of the Zombie, might work.