Professional Web Applications Themes

a box fall through the ground - Macromedia Director 3D

i create a ground and a box on the ground but when playing , the box fall through the ground why...

Sponsored Links
  1. #1

    Default a box fall through the ground

    i create a ground and a box on the ground
    but when playing , the box fall through the ground
    why
    Sponsored Links
    new3Duser Guest

  2. #2

    Default Re: a box fall through the ground

    new3Duser wrote:
    >i create a ground and a box on the ground
    >but when playing , the box fall through the ground
    >why
    >
    >
    Take a look at 'collision' in 3D dictionary.

    --
    ----------------------------------
    Diego Mangoni
    Multimedia Developer
    [url]http://www.dmzone.it[/url]
    ----------------------------------
    Diego Guest

  3. #3

    Default Re: a box fall through the ground

    about what in 3d dictionary?
    i create in 3d max and export w3d file
    init in director
    new3Duser Guest

  4. #4

    Default Re: a box fall through the ground

    Two things to check:

    1. Make sure the ground plane is linked as part of the rigid body collection
    and has a gravity of 0.

    2. The starting position of the box needs to be slightly above the ground
    plane. If it's touching the plane at all it will fall right through.

    hope this helps

    knew-bee Guest

  5. #5

    Default Re: a box fall through the ground

    Originally posted by: knew-bee
    Two things to check:

    1. Make sure the ground plane is linked as part of the rigid body collection
    and has a gravity of 0.

    2. The starting position of the box needs to be slightly above the ground
    plane. If it's touching the plane at all it will fall right through.

    hope this helps

    i try as you say except set the gravity = 0
    i need the gravity = vector(0,0,-9.81)
    i set the box higher than the ground plane 20
    but it seems to not work

    property pSprite
    property pHavok
    property pCreated
    --property pModel
    --property pTimeStep = 0.1667
    --property pSubSteps = 4
    --property pScale = 1
    --property pTolerance = 0.1

    on BeginSprite me
    pSprite = member("RobotSoccer")
    pHavok = member("RobotSoccerScene")
    pSprite.ResetWorld()
    --pTolerance = 0.1
    --pScale = 1
    --if pHavok.initialized then
    --pHavok.ShutDown()
    --end if
    pHavok.initialize(pSprite,0.1,1)
    pHavok.gravity = vector(0,0,-9.81)
    pCreated = false
    if not pCreated then
    pCreated = true
    --create ground
    pModel = pSprite.model("ground")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    rb = pHavok.MakeFixedRigidBody(pModel.name)
    rb.restitution = 0

    --create TopWall
    pModel = pSprite.model("TopWall")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    pHavok.MakeFixedRigidBody(pModel.name,false)

    --create DownWall
    pModel = pSprite.model("DownWall")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    pHavok.MakeFixedRigidBody(pModel.name,false)

    --create LeftTopWall
    pModel = pSprite.model("LeftTopWall")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    pHavok.MakeFixedRigidBody(pModel.name)

    --create LeftDownWall
    pModel = pSprite.model("LeftDownWall")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    pHavok.MakeFixedRigidBody(pModel.name)

    --create RightTopWall
    pModel = pSprite.model("RightTopWall")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    pHavok.MakeFixedRigidBody(pModel.name)

    --create RightDownWall
    pModel = pSprite.model("RightDownWall")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    pHavok.MakeFixedRigidBody(pModel.name)
    ----------------------------------------------------
    ----------------create yellow robot-----------------
    ----------------------------------------------------
    --create YellowGoalKeeper
    pModel = pSprite.model("YellowGoalKeeper")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot01
    pModel = pSprite.model("YellowRobot01")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot02
    pModel = pSprite.model("YellowRobot02")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot03
    pModel = pSprite.model("YellowRobot03")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot04
    pModel = pSprite.model("YellowRobot04")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot05
    pModel = pSprite.model("YellowRobot05")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot06
    pModel = pSprite.model("YellowRobot06")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot07
    pModel = pSprite.model("YellowRobot07")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot08
    pModel = pSprite.model("YellowRobot08")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot09
    pModel = pSprite.model("YellowRobot09")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create YellowRobot10
    pModel = pSprite.model("YellowRobot10")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)




    ----------------------------------------------------
    ----------------create blue robot-------------------
    ----------------------------------------------------
    --create BlueGoalKeeper
    pModel = pSprite.model("BlueGoalKeeper")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot01
    pModel = pSprite.model("BlueRobot01")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot02
    pModel = pSprite.model("BlueRobot02")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot03
    pModel = pSprite.model("BlueRobot03")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot04
    pModel = pSprite.model("BlueRobot04")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot05
    pModel = pSprite.model("BlueRobot05")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot06
    pModel = pSprite.model("BlueRobot06")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot07
    pModel = pSprite.model("BlueRobot07")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot08
    pModel = pSprite.model("BlueRobot08")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot09
    pModel = pSprite.model("BlueRobot09")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)

    --create BlueRobot10
    pModel = pSprite.model("BlueRobot10")
    pModel.RemoveModifier(#meshdeform)
    pModel.AddModifier(#meshdeform)
    --mass 60kg
    pHavok.MakeMovableRigidBody(pModel.name,60,true,#b ox)
    end if
    end

    on EnterFrame me

    end

    on ExitFrame me
    --pHavok.step(pTimeStep,pSubSteps)
    pHavok.step(0.1667,4)
    end

    on EndSprite me
    if pHavok.initialized then
    pHavok.ShutDown()
    end if
    end

    new3Duser Guest

Similar Threads

  1. Ground detection
    By xSpiffx in forum Macromedia Director 3D
    Replies: 4
    Last Post: October 25th, 07:20 PM
  2. php from ground up for newbie
    By Matt McKay in forum PHP Development
    Replies: 5
    Last Post: October 14th, 05:12 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