Professional Web Applications Themes

Havok Collision in zero gravity - Macromedia Director 3D

Can anyone give me a hint on how to prevent havok objects from spinning out of control after colliding in a zero gravity scene? I know there has got to be something very basic that I'm not putting together. I've tried changing the scene dragParameters, and both objects' restitution. Neither of these seem to make any difference at all. Curently I'm using the antigravity Havok behavior, but I've also tried just setting the scene gravity to (0,0,0). What I would like to have happen is my player object collides, spins a little and recovers and all linear and angular velocity ...

  1. #1

    Default Havok Collision in zero gravity

    Can anyone give me a hint on how to prevent havok objects from spinning out of
    control after colliding in a zero gravity scene? I know there has got to be
    something very basic that I'm not putting together.

    I've tried changing the scene dragParameters, and both objects' restitution.
    Neither of these seem to make any difference at all. Curently I'm using the
    antigravity Havok behavior, but I've also tried just setting the scene gravity
    to (0,0,0).

    What I would like to have happen is my player object collides, spins a little
    and recovers and all linear and angular velocity is quickly brought down to 0.

    Thanks in Advance for any help!

    Skavengur Guest

  2. #2

    Default Re: Havok Collision in zero gravity

    Its perhaps a little rough and ready, but you could multiply the linear and
    angular velocities by a value less than 1 every frame.

    rb1.linearvelocity = rb1.linearvelocity * 0.8
    rb1.angularvelocity = rb1.angularvelocity * 0.8

    for a more accurate system you could change the decimal value according to
    how much time has passed since the last frame.

    Andrew Nye
    Melted Games
    [url]www.meltedgames.co.uk[/url]


    "Skavengur" <webforumsusermacromedia.com> wrote in message
    news:cvl7l4$ckg$1forums.macromedia.com...
    > Can anyone give me a hint on how to prevent havok objects from spinning
    out of
    > control after colliding in a zero gravity scene? I know there has got to
    be
    > something very basic that I'm not putting together.
    >
    > I've tried changing the scene dragParameters, and both objects'
    restitution.
    > Neither of these seem to make any difference at all. Curently I'm using
    the
    > antigravity Havok behavior, but I've also tried just setting the scene
    gravity
    > to (0,0,0).
    >
    > What I would like to have happen is my player object collides, spins a
    little
    > and recovers and all linear and angular velocity is quickly brought down
    to 0.
    >
    > Thanks in Advance for any help!
    >

    Andrew Nye Guest

  3. #3

    Default Re: Havok Collision in zero gravity

    years ago:) i dids little demo to control the dragparameters in the havok scene.
    and i found out that there is a little bug in the authoring mode.

    first of all you can change the dragparameters, but only the first time you
    start the authoring. changing it a second time does not work.

    just do a shockwave3D internet thing and test it.



    hondo3000 Guest

  4. #4

    Default Re: Havok Collision in zero gravity

    ah haa! Thanks for your help guys. reducing the linear and angular velocity
    slowed down my player during controlled movement, but I didn't notice any
    difference "post-collision". However, Hondo was right about the dragParameters.
    I only see it's effect in a browser, I don't see it in authoring mode. It also
    <seems> to cause Director to be pretty unstable. Keeps crashing on me when I
    have it in the script. Seems like I read a post once that talked about that.

    Hondo, were you referring to your tech demo "havok_thing"? I came across it
    when looking for an answer to another problem. Pretty sweet. That's the type
    of character motion I'm actually aiming for. Getting pretty close now.

    Anyways, thanks again!

    Skavengur Guest

  5. #5

    Default Re: Havok Collision in zero gravity

    i was referring to this one
    [url]http://kisd.de/~lutz/3dtest/havok/[/url]

    i used it to get in contact with the havok xtra.

    you can move the camera with: w,a,s,d and the arrowkeys

    you can move one of the balls with: t,f,g,h -

    and you can change the dragparameters there.

    it is a little bit crappy and more made for myself to testaround.

    but i found another interesting fact about the havok xtra.
    if you set up the havok substeps to a higher value than 1 you have to
    recalculate the forces for gravity.

    if you want to use gravity and having some object that should fly you would
    think just to give the object a -gravity vector. but if you use for example 4
    substeps then you will notice that the -gravity vector is smaller than the
    normal gravity verctor and your object will go down.
    in my opinion the reason for this is that you only send only every fourth
    havokstep a -gravity vector from lingo. because the havoksubstebs are between
    the lingo framesteps.
    you have to use the this:
    pHavok.registerStepCallback(#stepHandler, me )
    but you a little bit code in the havok reference.

    i just tell this because it took me a little bit time to get this and i spend
    some time finding a solution.... :) but may be you know all these things...

    hondo3000 Guest

  6. #6

    Default Re: Havok Collision in zero gravity

    hi, im new to director 3d.
    can anyone tell me or show me how to create gravity for director 3d!
    im basically creating a 3d world using maya. and inside the world it has a
    airballon which i need to to some how fly. i managed to just control the
    airballon forwards, backward, left and right. but i having difficulty of
    learning how to give it gravity?? and i then need to be able to make it life
    and desend. oh and do i just put a collision detection for the ground to stop
    it from falling stright through?

    or please just show me a link to some usefull tutorials

    thanks

    bobstarlau 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 Gravity/Friction Question
    By jabaro in forum Macromedia Director 3D
    Replies: 1
    Last Post: September 4th, 09:30 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