Activity › Forums › Adobe After Effects Expressions › position expressions and relative movement
-
position expressions and relative movement
Posted by Dave O’dowd on October 24, 2006 at 3:16 amHey all,
I’m trying to make a mouse move in relative distance to the cursor arrow on a computer screen through ecpressions.
Everytime I set it up I just end up moving the mouse the exact same path that I’m moving the cursor.I would like to have the mouse move along the same motion path as the cursor but effectively just a percentage of the total movement.
any ideas?
-DaveFrank Boxman replied 12 years, 8 months ago 3 Members · 7 Replies -
7 Replies
-
Mike Clasby
October 24, 2006 at 6:18 amIf the mouse stays in the same position relative to the cursor arrow, you could just position the mouse in it’s position relative to the arrow, then parent the mouse layer to the Arrow layer. Right Click any of the column headings in the timeline if parenting isn’t visible, then Columns>Parent, and pickwhip then Mouse to the Arrow.
Or, Dan’s expressions for Trails should also do the trick, here:
https://www.motionscript.com/mastering-expressions/follow-the-leader.html
Uness I’mnot understanding what you want to do.
-
Dave O’dowd
October 26, 2006 at 9:39 pmHi there, sorry for the late reply,
I have to run into the bustling metropolis of Whistler to the internet cafe to respond as we don’t have the interweb at our house.
Thanks for the reply and the resource link, that page is fantastic,What I am trying to do is slightly different, I am looking to have the mouse and cursor arrow move at the same time and along the same path, like the follow the leader, but with a key diference, if the arrow moves two inches along a path I want the Mouse to move an inch along the same path.
ie. when a computer mouse moves, it moves the cursor much farther along the the screen then the mouse actually moves.
I hope I cleared that up a little, any suggestions?
thanks in advance.
Messydesk -
Mike Clasby
October 27, 2006 at 6:22 amWell, here’s a different tack on the Mouse moves, Arrow moves on the same path, but twice as far. If you mean the arrow moves in the same relative direction as the mouse, but twice as far, like a real mouse and cursor, try this.
Position your mouse and cursor on the screen.
I’m assuming the layers are names “mouse” and “arrow”, change the names as needed for the expression below.
Add this expression to the arrow layer’s position (Alt Click the Arrow’s position stopwatch, paste the expression in):
value + thisComp.layer(“mouse”).position*2
the *2 says times 2, *4 would be the arrow moving 4 times as much as the mouse, so increase or decrease as needed.
OK, your arrow probably disappeared, no problem, change the comp window resolution down to 25 or even 12.5 % so you can see the outline of the arrow layer out there on the paste board where it disappeared to. Now drag it back onto the screen where you want it to start. You might have to lock the Mask that makes the arrow if your using a mask, as trying to drag it around often grabs a mask vertex by mistake, no mask, no problem. Anyway you should have your arrow now moving in the same direction as the mouse but twice as far.
-
Dave O’dowd
October 28, 2006 at 7:31 pmThanks,
that expression looks ten times simpler than anything that I’ve been trying over the past couple of days. I’ll go give that a shot.
-dave -
Dave O’dowd
October 30, 2006 at 7:20 pmThat worked a charm!!!
Thanks a bunch, solutions are so often simpler than you think.
-Dave -
Frank Boxman
August 27, 2013 at 9:49 amYes! Thanks! Why was it so hard to find this answer? I’ve been at it for hours and did not expect to find it in a post as old as this.
It might have to do with some terminology.
I’d love it to be cleaner, without having to reposition (I decided to do that with sliders), but this does the trick.
Thanks again!
Reply to this Discussion! Login or Sign Up