Hello!
I’m developing a game with some board game mechanics. I need to pick up a game piece with the Mouse and then drop it on a Legal position.
Suppose the Legal movement of a particular piece is limited to a certain radius, how can I make it so that once I pick up my piece I can’t move the mouse past a specific distance from the original position?
Thanks a lot for your help!
via C++ I did something like this for my old game:
if (cursorlocation.Y < cameralocation.Y +1000.0f && cursorlocation.Y > cameralocation.Y - 1000.0f && cursorlocation.X < cameralocation.X +1500.0f && cursorlocation.X > cameralocation.X - 1500.0f )
{
movecursor();
}
this keeps the mouse moving in only in a square(don’t know how to do this in BP)
or you can put collision objects on each side of the camera view
Problem I’m having is that through BluePrints I can’t seem to find a “Set Mouse Position” function to update the cursor (I can read and validate the mouse position, but can’t set it to be within the bounds I want)