You could add keys for Mouse X and Mouse Y in the input manager. That would be that fastest way. No need to touch the flow machine at all.The same for mouse clicks.
I don't understand, what's the problem.We need more information to help you.If you have problems writing in english I would recommend writing your question in your native language and translate it via https://www.deepl.com/translator or even google translator, that we can understand it better.
Not enough information to help you
It's just a rounding for the editor to save resources and keep it clean. When you save the value as variable you see, that everything is correct.
With what are you walking into the trigger box? Triggers are physics object so make sure you have a kinematic rigidbody on your trigger object.
As example for a basic trigger logic:
This are questions specially for you case.I would recommend you join the ludiq discord (my name is there Quacklin) and we can solve it much better.
First.Make sure you replicate the correct setup like here:
There is no Boolean variable anymore, because i write the target position into the SnapPos Vector3 variable and check it against null.What you are doing is checking a boolean that is true if it is null. but because it has a fixed value in your graph (true) the null check will always be not null.You mixed my first version with the last one. They are completely different.
Second. The collider from your Object 1 is filled over the whole sprite. That will not work correctly with the setup above. You have to decrease the collider radius. I would prefer to set it to 4 instead of 40.
Last.I can't see the properties of your grid cell. It looks like you added the collider. That's correct. Make sure, that it isn't a trigger and the collider is filling the image.You want to know the border from each cell. That's why it is filled. But from the dragable Object you only want to know when the center is colliding with a cell. When you have the grid cell selected (Image) hit ctrl + D a bunch of times to fill up your grid.
All the (images) that are selected are my cells. They are children of a UI panel, which has a layout grid component with a padding from 3 on X and Y.
They are children of a UI panel, which has a grid layout group component with a padding from 5 on X and Y.
As you can see in the first image from my last reply. Each cell needs a collider, which defines the boundary from each cell.
So every cell has a Box Collider 2d.Make sure the collider size matches the rect transform size.
The draggable image has a Box Collider 2D with trigger enabled and a kinematic rigidbody.To simplify I put the flow machine on this object.I prefer choosing a smaller size for the collider, so the objects snaps only to a new grid cell, if the center is inside the new cell
I think this is more optimized
Customer support service by UserEcho