Unfortunately I'm designing an interface for
an public installation where only a mouse will
be present (and what's more a Mac mouse), this
is why I have the two cubes. I tried parenting
them at the beginning, but I need the big cube
to replicate exactly the movements of the
little cube without orbiting around it. The idea
is that people will use the little cube to rotate
the big cube and then click on the face of the big
cube to navigate, is there any way to accomplish this
that you know of?
thanks again for your time
mark m
>-- Original Message --
>To: [EMAIL PROTECTED]
>From: Colin Holgate <[EMAIL PROTECTED]>
>Subject: RE: <lingo-l> one 3d cube rotate the other?
>Reply-To: [EMAIL PROTECTED]
>Date: Tue, 30 Jul 2002 17:45:29 -0400
>
>
>>Well when I opened the library script to
>>make my minor alterations, a tear came to my eye
>>( you see I'm still learning).
>>
>>If anyone has a neat solution I would be immensely grateful,
>>thank you for your time,
>
>
>I understand that, those behaviors take care of everything, and make
>coffee too. All you're trying to do is parent one thing to another,
>but do you want to directly manipulate the model with the mouse, or
>can you get by with keystrokes? Here's a simple script to show just
>the parenting part of things:
>
>Make a new movie that has one cast member, a 3D member named "world".
>Drag it onto the stage. Make a movie script (command-shift-u will do)
>and paste this in there:
>
>global littleboxmodel,bigboxmodel
>
>on startmovie
> w = member("world")
> w.resetworld()
> littleboxRes = w.newmodelresource("little box", #box)
> littleboxRes.width = 10
> littleboxRes.height = 10
> littleboxRes.length = 10
> bigboxRes = w.newmodelresource("big box", #box)
> bigboxRes.width = 50
> bigboxRes.height = 50
> bigboxRes.length = 50
> littleboxmodel = w.newmodel("little box",littleboxRes)
> bigboxmodel = w.newmodel("big box",bigboxRes)
> bigboxmodel.parent = littleboxmodel
> bigboxmodel.translate(100,0,0)
>end
>
>on exitframe
> bigleft = keypressed("j")
> bigright = keypressed("l")
> bigup = keypressed("i")
> bigdown = keypressed("k")
> littleleft = keypressed("a")
> littleright = keypressed("d")
> littleup = keypressed("w")
> littledown = keypressed("s")
> bigboxmodel.rotate(-bigleft+bigright,-bigup+bigdown,0)
> littleboxmodel.rotate(-littleleft+littleright,-littleup+littledown,0)
> go the frame
>end
>
>
>Run the movie, and you should see that pressing the keys ijkl will
>rotate just the big box, and the keys wasd will rotate the little box
>and the big box. Then let me know if you have questions!
>
>
>
>
>
>
>
>--
>[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi
> To post messages to the list, email [EMAIL PROTECTED] (Problems, email
>[EMAIL PROTECTED]). Lingo-L is for learning and helping with programming
>Lingo. Thanks!]
Mark m
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]