grab following a line

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
kelyanok
Posts: 22
Joined: Sun Feb 23, 2020 8:48 am
Location: Belgium

grab following a line

Post by kelyanok » Sun Apr 12, 2020 10:40 am

how do i make so the player can grab an object but he cant move it everywhere, only at points that i choose? (not floating points, maybe a line or a curve)

SparkOut
Posts: 2350
Joined: Sun Sep 23, 2007 4:58 pm

Re: grab following a line

Post by SparkOut » Sun Apr 12, 2020 10:56 am

If I had time I would show a couple of techniques to do this sort of thing. It depends on whether you want to track a line or have a range of movement that then snaps to nearest point after dropping. I am sure other people will be interested in this as an experiment so you may have other suggestions, but for the purposes of an answer here and now, malte's Animation Engine will make this very simple to "constrain" https://livecode.com/extensions/animati ... e-5/6-0-0/
It's dual licenced for Commercial and Community versions

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”