[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
48
S
15
G
6
Posts: 795
Reputation: 12,035

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: 487
Reputation: 11,939

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
48
S
15
G
6
Posts: 795
Reputation: 12,035


Return to How do I....?

Who is online

Users browsing this forum: makkancs, Matthew de, Yahoo [Bot] and 28 guests