Professional Web Applications Themes

3d havok collision, it's getting stranger and stranger - Macromedia Director 3D

hello! it's getting stranger and stranger... please have a look: -- initiate properties and 3D world p3Dmember = sprite(me.spriteNum).member p3Dmember.resetWorld() pHavok=member("havok") pHavok.initialize(p3Dmember,0.1,1) mr = p3Dmember.newModelResource("GroundPlaneRes", #box) mr.width = 250 mr.length = 5 mr.height = 250 m = p3Dmember.newModel("GroundPlane", mr) m.transform.position = vector(0,0,-50) m.addModifier(#meshdeform) rb = pHavok.makeFixedRigidBody(m.name) rb.friction = 0.5 rb.restitution = 0 m2=p3Dmember.cloneModelfromCastmember("box","Box", member("box")) m2.transform.position = vector(0,0,-38) m2.addModifier(#meshdeform) rb2 = pHavok.makeFixedRigidBody(m2.name) rb2.friction=1 repeat with y = 0 to 3 repeat with x=0 to 3 xpos=y*20 ypos=x*20 objectName="ball_"&x&"_"&y p3Dmember.cloneModelfromCastmember(objectName,"Bal l",member("ball")) p3Dmember.model(objectName).transform.translate(xp os,ypos,0) p3Dmember.model(objectName).addModifier(#meshdefor m) pHavok.makeMovableRigidBody(objectName, 100.0, true, #sphere) end repeat end repeat this code is supposed to draw a set of ...

  1. #1

    Default 3d havok collision, it's getting stranger and stranger

    hello!

    it's getting stranger and stranger... please have a look:

    -- initiate properties and 3D world
    p3Dmember = sprite(me.spriteNum).member
    p3Dmember.resetWorld()

    pHavok=member("havok")

    pHavok.initialize(p3Dmember,0.1,1)


    mr = p3Dmember.newModelResource("GroundPlaneRes", #box)
    mr.width = 250
    mr.length = 5
    mr.height = 250
    m = p3Dmember.newModel("GroundPlane", mr)
    m.transform.position = vector(0,0,-50)

    m.addModifier(#meshdeform)
    rb = pHavok.makeFixedRigidBody(m.name)
    rb.friction = 0.5
    rb.restitution = 0


    m2=p3Dmember.cloneModelfromCastmember("box","Box", member("box"))
    m2.transform.position = vector(0,0,-38)
    m2.addModifier(#meshdeform)
    rb2 = pHavok.makeFixedRigidBody(m2.name)
    rb2.friction=1


    repeat with y = 0 to 3
    repeat with x=0 to 3
    xpos=y*20
    ypos=x*20
    objectName="ball_"&x&"_"&y
    p3Dmember.cloneModelfromCastmember(objectName,"Bal l",member("ball"))
    p3Dmember.model(objectName).transform.translate(xp os,ypos,0)
    p3Dmember.model(objectName).addModifier(#meshdefor m)
    pHavok.makeMovableRigidBody(objectName, 100.0, true, #sphere)
    end repeat
    end repeat

    this code is supposed to draw a set of balls, a box and a plane. where
    the two last are fixed rigid bodies.
    if I run this script with Director 8.5, it complains that rb2.friction
    is not a property *but* if I run the script in debug mode, it works...

    does someone has an idea? this is driving me nuts. it can't work in
    debug but not in the real mode...

    strange...

    david
    david Guest

  2. #2

    Default Re: 3d havok collision, it's getting stranger and stranger

    > does someone has an idea? this is driving me nuts. it can't work in
    > debug but not in the real mode...
    ....unless debug mode is running slowly enough for something in Havok to be
    processed before the .friction line is processed?

    Andrew

    Andrew Morton Guest

Similar Threads

  1. collision detection in havok?
    By mk0505 in forum Macromedia Director 3D
    Replies: 3
    Last Post: April 15th, 02:12 PM
  2. havok collision
    By Rastermaster in forum Macromedia Director 3D
    Replies: 0
    Last Post: March 25th, 03:53 PM
  3. havok collision is not working
    By david in forum Macromedia Director 3D
    Replies: 19
    Last Post: July 12th, 02:49 PM
  4. Very stranger error led(5FF)
    By jose in forum AIX
    Replies: 0
    Last Post: August 14th, 02:02 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