Professional Web Applications Themes

modelUnderLoc - Macromedia Director 3D

Hi I am using the modelUnderLoc to detect which model is clicked. The models are moving in the 3d world. modelUnderLoc works fine and it detects which model is clicked also but with some models after click on the model the entire screen freezes for some time and then becomes normal. It detects the models but the entire move get paused for some time. Any idea how to solve it. Yogesh...

  1. #1

    Default modelUnderLoc

    Hi
    I am using the modelUnderLoc to detect which model is clicked. The models are
    moving in the 3d world. modelUnderLoc works fine and it detects which model is
    clicked also but with some models after click on the model the entire screen
    freezes for some time and then becomes normal. It detects the models but the
    entire move get paused for some time.
    Any idea how to solve it.

    Yogesh

    yogeshhungama Guest

  2. #2

    Default Re: modelUnderLoc

    i think you have lot of models in your scene, maybe you should optimeze your
    modelsunderloc comand with a list of arguments.

    check the entry of the livedocs from Charles Parcell:

    ModelsUnderRay & Loc
    --------------------------
    3D Picking has been enhanced to take advantage of user/application's a
    priori knowledge. Two 3D picking apis now can take an optional parameter
    specifying the list of models to traverse when checking for picking:
    modelsUnderRay() and modelsUnderLoc().

    These two apis have been extended to take an optional property list as its
    third and second parameter respectively. The old api still works. Here is a
    lingo example:

    -- build your modelList
    modelList = [model1, model4, model7, model8]

    -- build your optional argument list
    argList = [#maxNumberOfModels:10,
    #levelOfDetail:#simple,#modelList:myModelList]

    -- determine picking
    list1 = s3dCastMember.modelsUnderRay(locationVector, directionVector,argList)

    list2 = s3dCastMember.camera(1).modelsUnderLoc(pointWithin Sprite, argList)


    It should be noted that the optional argument list (property list) can contain
    any of the optional parmeters. For example, argList = [#maxNumberOfModels:5,
    #modelList:myModelList] is perfectly acceptable. The level of detail here will
    be the default, which is #simple.

    Also, when building your modelList for picking, you must explicitly include
    all models that you are interested in. The 3D engine will not automatically
    include the children of your modelList when determining picking. If you want a
    hierarchy of models to be included for picking, you must traverse this
    hierarchy yourself and explicitly add it to your modelList.

    may be this can help you to speed up your script.

    hondo3000 Guest

Similar Threads

  1. A reverse Modelunderloc?
    By kingdegen in forum Macromedia Director 3D
    Replies: 8
    Last Post: April 20th, 03:30 PM

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