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)?
Is this what you want?
preview
Capx
Develop games in your browser. Powerful, performant & highly capable.
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/
keepee , thanks this is what i really want ^^
JohnnySix , ill use your example in some other stuffs thanks ^^