Professional Web Applications Themes

Trying to get collision detection working with havok - Macromedia Director 3D

Hi - I'm having some trouble using collision detection within director using a w3d file with havok applied to it. I've been using the registerinterest function but I get a "value out of range" error. This is my code (there is a cone and box on a plane imported from 3d max - named Cone01 and Box01 these are both movable rigid bodies). on beginSprite me box1=member("3d").model("Box01") cone1=member("3d").model("Cone01") w = member ( 1 ) hk = member( 2 ) hk.initialize( w, 0.1, 1 ) hk.registerInterest (box1, cone1, 10, 0, #collision, me) end on collision me, details sound(2).play(member("hihats")) end on enterFrame ...

  1. #1

    Default Trying to get collision detection working with havok

    Hi - I'm having some trouble using collision detection within director using a
    w3d file with havok applied to it. I've been using the registerinterest
    function but I get a "value out of range" error.

    This is my code (there is a cone and box on a plane imported from 3d max -
    named Cone01 and Box01 these are both movable rigid bodies).

    on beginSprite me
    box1=member("3d").model("Box01")
    cone1=member("3d").model("Cone01")
    w = member ( 1 )
    hk = member( 2 )
    hk.initialize( w, 0.1, 1 )
    hk.registerInterest (box1, cone1, 10, 0, #collision, me)
    end

    on collision me, details
    sound(2).play(member("hihats"))
    end

    on enterFrame me
    end

    -----------
    I've also tried this and had no luck:
    on beginSprite me
    rb1 = sprite(1).pHavok.rigidBody("Box01")
    rb2 = sprite(1).pHavok.rigidBody("Cone01")
    w = member ( 1 )
    hk = member( 2 )
    hk.initialize( w, 0.1, 1 )
    hk.registerInterest (rb1, rb2, 10, 0, #collision, me)
    end

    Any help would be great.
    Thanks

    josiewales Guest

  2. #2

    Default Re: Trying to get collision detection working with havok

    That's at least 3 forums you've posted the same question to. Perhaps you
    could post to one and wait for a reply before trying another
    Sean Guest

  3. #3

    Default Re: Trying to get collision detection working with havok

    [q]Originally posted by: josiewales
    Hi - I'm having some trouble using collision detection within director using a
    w3d file with havok applied to it.[/q]

    Just study this example:
    http://necromanthus.com/Games/ShockWave/tutorials/FPS_Havok.html
    cheers



    necromanthus Guest

  4. #4

    Default Re: Trying to get collision detection working with havok

    This is what I called a good demo. Hi necromanthus, do you have anything using 11?
    mziskandar Guest

  5. #5

    Default Re: Trying to get collision detection working with havok

    [q]Originally posted by: mziskandar
    This is what I called a good demo. Hi necromanthus, do you have anything using
    11?[/q]

    Any v10 DIR file can be updated to v11 (but Havok is not officially supported
    in v11).

    cheers



    necromanthus Guest

  6. #6

    Default Re: Trying to get collision detection working with havok

    Thanks for this however I am getting the following error:


    Script error: Handler not defined

    setmouse(the stageleft+centerX,the stageTop+centerY)--"SetMoutra"
    #SetMouse

    scharansky Guest

Similar Threads

  1. havok collision detection problem
    By JustStupid in forum Macromedia Director 3D
    Replies: 2
    Last Post: August 4th, 11:08 PM
  2. collision detection in havok?
    By mk0505 in forum Macromedia Director 3D
    Replies: 3
    Last Post: April 15th, 02:12 PM
  3. havok collision
    By Rastermaster in forum Macromedia Director 3D
    Replies: 0
    Last Post: March 25th, 03:53 PM
  4. Havok Collision Detection
    By Rastermaster in forum Macromedia Director 3D
    Replies: 3
    Last Post: March 8th, 07:40 PM
  5. havok collision is not working
    By david in forum Macromedia Director 3D
    Replies: 19
    Last Post: July 12th, 02:49 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