[solved]follow mouse with range

Get help using Construct 2

Post » Mon Aug 27, 2012 3:25 pm

how can i make an object which follow my mouse but it has a limit range the object can't go more than that range , also can it be done with lerp? for example like this lerp(start position,max range,0.2)?


zsangerous2012-08-28 04:26:58
B
52
S
16
G
7
Posts: 795
Reputation: 12,820

Post » Mon Aug 27, 2012 6:50 pm

Is this what you want?
preview

Capx
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Mon Aug 27, 2012 7:47 pm

A similar question was asked a while back, hope this is what you're looking for.

http://www.scirra.com/forum/object-moving-within-a-range_topic50718.html?KW=mouse

Web example - using LERP.

http://www.johnnysix.net/games/MouseDemoX/
Image
B
27
S
9
G
5
Posts: 488
Reputation: 11,948

Post » Tue Aug 28, 2012 4:26 am

@keepee , thanks this is what i really want ^^

@JohnnySix , ill use your example in some other stuffs thanks ^^
B
52
S
16
G
7
Posts: 795
Reputation: 12,820


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot], istero and 9 guests