How do I restrict one sprites movement to a boundary?

Get help using Construct 2

Post » Fri May 06, 2016 9:01 pm

Hey,

Could any kind person explain to me the simplest way to restrict one sprites movement to be within the confines of another sprite? i.e. like in a virtual thumbstick?

I'm trying to get the top sprite to be able to be dragged within the boundary created by the larger sprite below and snap back to its original location when you let go again.

Thanks
B
4
Posts: 9
Reputation: 216

Post » Fri May 06, 2016 9:18 pm

How are both sprites shaped ?
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sat May 07, 2016 1:11 pm

They are circular?
B
4
Posts: 9
Reputation: 216

Post » Sat May 07, 2016 1:49 pm

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
34
G
47
Posts: 1,194
Reputation: 30,892

Post » Sat May 07, 2016 9:21 pm

Hehe, worked on this, came back and found a more elegant solution then mine.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue May 24, 2016 3:50 pm

Thank you both for looking at this, I sorted it by ammending features in the capx posted above.

:)
B
4
Posts: 9
Reputation: 216


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests