Professional Web Applications Themes

Linked Rotation, world relative - Macromedia Director 3D

Hi, i want to solve the following thing in my movie: I've got two cast members: A 3D-Model of a car and a 3D-sphere. If the user rotates the sphere, the car should rotate in the same direction as the sphere, so that the sphere is a kind of trackball. I' ve tried the following: I applied the "drag model to rotate"-Action which comes with director to the sphere-cast member. In addition i applied the following to the Sphere, which should link the rotation of the sphere and the car: property sp1model, sp2model on beginSprite me sp1model=sprite(9).member.model("sphere") sp2mode=sprite(1).member.model("car") end on ...

  1. #1

    Default Linked Rotation, world relative

    Hi,


    i want to solve the following thing in my movie:

    I've got two cast members: A 3D-Model of a car and a 3D-sphere.

    If the user rotates the sphere, the car should rotate in the same direction as the sphere, so that the sphere is a kind of trackball.

    I' ve tried the following:

    I applied the "drag model to rotate"-Action which comes with director to the sphere-cast member.
    In addition i applied the following to the Sphere, which should link the rotation of the sphere and the car:

    property sp1model, sp2model

    on beginSprite me
    sp1model=sprite(9).member.model("sphere")
    sp2mode=sprite(1).member.model("car")
    end

    on exitFrame me
    sp2.model.transform.rotation = sp1.model.transform.rotation
    end

    The Script works, but the car rotates around his self-axis and not around the world axis.

    How can i tell the script per Lingo, that the car should rotate around the world-axis. I know that i have to use the lingo #world but i don't know, at which position of the script i have to build in this command.

    It would be great if someone could help me along.

    Greetings


    Daniel


    Basement_media webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Linked Rotation, world relative

    Hi,

    thanx for your reply.

    But director says "Invalid Parameter, #rotate" when i try the lingo, you' ve posted.
    Thanx anyway.

    Greetings

    Daniel


    Basement_media webforumsuser@macromedia.com Guest

  3. #3

    Default Re: Linked Rotation, world relative

    well as a second try you could use this

    on exitFrame me
    sp2mode.transform.rotation = sp1.model.transform.rotation
    pp=sp2mode.worldposition
    sp2mode.rotate(sp2mode, vector(3,0,0),5,#world)
    end


    but I can't promise it works as I haven't got the movie

    HAIRYBOBBY - why didn't I choose a really cool name like the vulcanpimp

    [url]http://www.geocities.com/hairybobby2000[/url]

    Photograpghy section

    [url]http://www.geocities.com/hairybobby2000/px1.html[/url]

    Photoshop section

    [url]http://www.geocities.com/hairybobby2000/photo1.html[/url]
    hairybobby webforumsuser@macromedia.com Guest

Similar Threads

  1. Rotation between two transform.rotation vectors.
    By SuperTank in forum Macromedia Director 3D
    Replies: 3
    Last Post: September 27th, 05:07 PM
  2. rotation of model in relation with world
    By Chanizz in forum Macromedia Director 3D
    Replies: 1
    Last Post: May 28th, 11:06 AM
  3. how to "bounce" sphere relative to world
    By StevenAdams in forum Macromedia Director 3D
    Replies: 1
    Last Post: March 2nd, 05:46 PM
  4. external linked files relative paths...how to?
    By nickelsock webforumsuser@macromedia.com in forum Macromedia Director Basics
    Replies: 0
    Last Post: August 2nd, 09:24 AM
  5. Site relative or doent relative links prob.
    By Paul Anthony webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 0
    Last Post: July 21st, 08:38 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139