realbasic-nug
[Top] [All Lists]

Re: 2D Graphics: 2 or more objects moving relative to each other...

To: "REALbasic NUG" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: 2D Graphics: 2 or more objects moving relative to each other...
From: "Philip Regan" <pregan at gmail dot com>
Date: Fri, 31 Mar 2006 07:26:39 -0500
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lmna6DiIPSE+zXA82f9sl06sl0JiHoTG/UMzTkZB/O9OT6rk3P2YPtb8/8LWS7R2WzBVuyhaUy44lFjc+J/l2T4KnR1cgGZzBwd/xFdPmcacRZ0rkrNPmEXV1dN+4mPTkW2MyFyrsjjulYjg3XaTB9x6XHlD/smA+P3xQFJV8oY=
References: <6489b2020603301846x57e99c11ua07feb65ee0989c2 at mail dot gmail dot com> <a06200772c05255562f48 at 10 dot 0 dot 1 dot 2>
Sorry...

I would like for them to move parallel to each other. So, when the
user selects a group of objects, they move as a group in their same
positions relative to each other.

What I can't seem to get beyond is either objects "flip" positions
(objects below and to the right get flipped to above and to the left
of the last object selected), or their positions get inverted and they
orbit a position equidistant between them.

The math I cooked up to do this is (in awful psuedocode):

(Object(0).Orig(X, Y) - Object(0).New(X, Y)) + Object(n).(X, Y)

I'm sure there's something fundamental I'm missing here...

Thanks!

On 3/30/06, Joseph J. Strout <joe at strout dot net> wrote:
> At 9:46 PM -0500 3/30/06, Philip Regan wrote:
>
> >I've been wracking my brain for two days now, and I just can't figure
> >this out. What's the 2D math to have two or more object relative to
> >each other?
>
> What do you mean by that?  If either of two objects is moving, then
> they're always moving relative to each other in some way.  What
> specific sort of motion are you looking for?
>
> Best,
> - Joe
>
> --
>
> Joseph J. Strout
> joe at strout dot net
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
>


--
--
Philip Regan
pregan at gmail dot com
http://homepage.mac.com/pregan
REALBasic 2005r4, Applescript
Mac OS 10.3.9
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>