Keep mouse/draggable actor within a defined space...
Hey all!
So I've been having some issues with a draggable actor and its collisions. I need the draggable actor to collide with wall objects. Unfortunately I realize that draggable actors cannot have true collisions. People on the forums were kind enough to give great suggestions but unfortunately they don't seem to help my particular issue.
So that said, I was curious if there is a way to keep a draggable actor (and or actors) confined to a certain area. I don't mean collisions, I mean a literal area of pixel space in which the actor doesn't move outside of?
Many thanks!
So I've been having some issues with a draggable actor and its collisions. I need the draggable actor to collide with wall objects. Unfortunately I realize that draggable actors cannot have true collisions. People on the forums were kind enough to give great suggestions but unfortunately they don't seem to help my particular issue.
So that said, I was curious if there is a way to keep a draggable actor (and or actors) confined to a certain area. I don't mean collisions, I mean a literal area of pixel space in which the actor doesn't move outside of?
Many thanks!
Comments
He also has a video on there where you can have collosions when constraing to mouse ( it doesnt actually constrain the position to the mouse position but works just as good)
cheers
But since I'm new, can you show me how to lets say keep my draggable actor within the following coordinates x-601.5 and y-415.
Thanks a million!