Keep mouse/draggable actor within a defined space...

delorianhayzedelorianhayze Member Posts: 55
edited November -1 in Working with GS (Mac)
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!

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    yes you can using the min and max functions in your constrains. Tshirt has a demo of that on gshelper.com

    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
  • delorianhayzedelorianhayze Member Posts: 55
    Thank you!
    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!
Sign In or Register to comment.