So i made an action marker and made it so that it sticks to a 16x16 grid and it follows the mouse direction around player but i don’t think it really sticks to 16x16 grid because whenever i place an item it just places it from the corner of the action marker.
As you can see the action marker is coming in between the objects it was supposed to place right where the action marker is itself
And i have uploaded the scene image (I have followed the gdevelop anchor tutorial)
Hi, my guess is that your offset values are not correct. You can find and change the offset values by clicking in the editor on the button ‘Toggle/edit grid’ → ‘grid setup’
Edit: I suggested that because I thought you build the scene based on a grid in the editor. After looking at your scene image it doesn’t look as if you have done that and I just realize that your issue is with creating objects and placing them according to the grid.
Alright, it seems I misunderstood your request. You mean you want to create objects in the scene and these objects should be created where your action marker is, basically in the same grid?
Edit: My guess is that you set the origin point of the action marker to the center. If you want to create the item exactly at the same point as the action marker, you also need to change the origin point of the item to the center.
The origin point of the anchor was set to center but the center option was set to auto after setting it manually and doing the same for all the place able object it is working properly now thank you!!!
Also do you know how can i make the anchor always stick in front of the player instead of setting the anchor to mouse?
You could add a point to your player sprite and use that as a reference to move the anchor (for different animations you have to change this point accordingly).