Why arent the wheels connected to Havok

Ask a Question related to Macromedia Director 3D, Design and Development.

  1. #1

    Default Why arent the wheels connected to Havok

    Ok I am totally lost with this havok thing. I am trying to understand what gets
    attached to the havok physics engine when designing a car racing game. However,
    after downloading both the jeep car and the remote control car games from
    director-online havok archive site, I noticed something very stange. While
    trying to decipher the code on both files it seems to me that the wheels are
    not attached to the Havok physic's engine. Now I could be wrong, but I wanted
    to ask you guys if this is correct, and if so, then how do the wheels follow
    the car as well as stay on the ground and without going through the ground? I
    am asking this becuase I could not pick it out through its lingo. There are so
    many behaviours attached to the 3d world that it is impossible to know where
    Director starts to read each behaviour.

    I understand a little bit about havok, such as if you want something movable
    then you attach a movable rigid body to it and if the object is fixed then you
    would attach the fixed rigid body to it. In addition, I also know a little bit
    about mass which sets the weight of the object. However, it seems to me that
    both of these games are way too advamced for me especially when just for now
    all I am trying to unserstand is how the wheels of a car can follow the body of
    the car and also for the wheels to stay on the ground and without them going
    through the ground.

    Roofy Guest

  2. Similar Questions and Discussions

    1. Running NTDSUTIL in Directory Services Restore mode - should be connected or NOT connected to the network?
      Gurus, I have been studying Windows Server 2003. Say you have an operations master which is off-line due to a lengthy hardware failure, such as...
    2. detecting if I am connected to a ISP
      Hi, I have written a small mail pre-viewer in Ruby/FXRuby which allows a graphic view of incoming mail headers, from which I can select canditates...
    3. Not connected to Oracle
      I have a simple SQL Select statement which is called in an ASP file. But this gives error saying Microsoft OLE DB Provider for Oracle...
    4. WTB Want to buy Tamrac Big Wheels 692 case
      Model 692 in New or Good Used condition. Please send email with condition & Price to nitecapt@optonline.net Thanks Ray
    5. Why arent my letters crisp?
      I am wondering how this was made http://www.evolutionm.net/img/top_nav_navbar.gif I want my navbar to be an image like that but when I create it...
  3. #2

    Default Re: Why arent the wheels connected to Havok

    Ok, lets start with the small stuff first, and maybe this will answer my
    original quesdtion. Looking at the jeep demo, what is the magnet object model
    for? Is that what the chassis and the wheels follow on and does this magnet
    model work like how real magnets do?

    Roofy Guest

  4. #3

    Default Re: Why arent the wheels connected to Havok

    Roofy wrote:
    > Ok, lets start with the small stuff first, and maybe this will answer my
    > original quesdtion. Looking at the jeep demo, what is the magnet object model
    > for? Is that what the chassis and the wheels follow on and does this magnet
    > model work like how real magnets do?
    >
    IIRC, the example you´re talking about has a "chassis" whose model
    consists in 4 wheels and the car itself it´s only attached to the
    chassis by a spring or dashpot to give the amortiguation effect.

    HTH,
    --
    Agustín María Rodríguez

    [url]www.onwine.com.ar[/url] > Macromedia Director demos & code
    Agustín María Rodríguez Guest

  5. #4

    Default Re: Why arent the wheels connected to Havok

    [Q]IIRC, the example you?re talking about has a "chassis" whose model
    consists in 4 wheels and the car itself it?s only attached to the
    chassis by a spring or dashpot to give the amortiguation effect.[/Q]

    ok, I might be wrong on this, but after pressing play and typing the following
    syntax in the message window...
    form the jeep demo ....
    put member("blankHavok").lineardashpot
    put member("blankHavok").spring.count

    and from the RemoteControl Car demo
    put member("carHKE").lineardashpot
    put member("carHKE").spring.count



    ... doing this in both files and after pressing play, I get an emplty list
    returned back for the dashpot and 0 for the count of the spring. So I don't
    think there are any dashpots nor springs on either demo. However, what I am
    concluding is that I think they are using 2 custom handlers called
    initializeHover and updateHover which is somehow detecting the chassis and its
    wheels if they collide or not. I did a test by disabling both of these custom
    handlers and by doing so, the chassis would fall through the wheels and land on
    the ground instead. On the other hand, if these 2 custom handlers are causing
    this effect, then I srill don't understand how the the wheels are following the
    chassis. Therefore, I am wondering if it would be easier to use modelsUnderRay
    considering that all I am trying to do is do collision detection? What do you
    think?


    Roofy Guest

  6. #5

    Default Re: Why arent the wheels connected to Havok

    Roofy wrote:
    > [Q]IIRC, the example you?re talking about has a "chassis" whose model
    > consists in 4 wheels and the car itself it?s only attached to the
    > chassis by a spring or dashpot to give the amortiguation effect.[/Q]
    >
    > ok, I might be wrong on this, but after pressing play and typing the following
    > syntax in the message window...
    > form the jeep demo ....
    > put member("blankHavok").lineardashpot
    > put member("blankHavok").spring.count
    >
    > and from the RemoteControl Car demo
    > put member("carHKE").lineardashpot
    > put member("carHKE").spring.count
    >
    >
    >
    > ... doing this in both files and after pressing play, I get an emplty list
    > returned back for the dashpot and 0 for the count of the spring. So I don't
    > think there are any dashpots nor springs on either demo.
    Sorry, I thought you were talking about this demo:

    [url]http://director-online.com/havok/demos/demo-dashcar.html[/url]
    > However, what I am
    > concluding is that I think they are using 2 custom handlers called
    > initializeHover and updateHover which is somehow detecting the chassis and its
    > wheels if they collide or not. I did a test by disabling both of these custom
    > handlers and by doing so, the chassis would fall through the wheels and land on
    > the ground instead. On the other hand, if these 2 custom handlers are causing
    > this effect, then I srill don't understand how the the wheels are following the
    > chassis. Therefore, I am wondering if it would be easier to use modelsUnderRay
    > considering that all I am trying to do is do collision detection? What do you
    > think?
    Actually, this RayCastCar demo uses modelsUnderRay() for collision
    detection of the wheels with the ground:

    -- For each wheel do
    repeat with i = 1 to pWheelPointList.count
    pIsHoveringList[i] = false
    worldWheelPoint = pChassisMDL.transform * pWheelPointList[i]
    intersectDetails = pMember.ModelsUnderRay(worldWheelPoint,
    worldDownDir, 2, #detailed)

    So the physics and control are applied to the chassis and the wheels are
    just "floating". At which distance should they float is what
    modelsUnderRay() is used for.

    This doesn´t mean that you don´t need Havok at all and you can use
    modelsUnderRay() instead since havok handles all the driving physics and
    MUR just the distance of the wheels to the chassis.

    Regards,
    --
    Agustín María Rodríguez

    [url]www.onwine.com.ar[/url] > Macromedia Director demos & code
    Agustín María Rodríguez Guest

  7. #6

    Default Re: Why arent the wheels connected to Havok


    Agustín María Rodríguez wrote:
    > Roofy wrote:
    > > [Q]IIRC, the example you?re talking about has a "chassis" whose model
    > > consists in 4 wheels and the car itself it?s only attached to the
    > > chassis by a spring or dashpot to give the amortiguation effect.[/Q]
    > >
    > > ok, I might be wrong on this, but after pressing play and typing the following
    > > syntax in the message window...
    > > form the jeep demo ....
    > > put member("blankHavok").lineardashpot
    > > put member("blankHavok").spring.count
    > >
    > > and from the RemoteControl Car demo
    > > put member("carHKE").lineardashpot
    > > put member("carHKE").spring.count
    > >
    > >
    > >
    > > ... doing this in both files and after pressing play, I get an empltylist
    > > returned back for the dashpot and 0 for the count of the spring. So I don't
    > > think there are any dashpots nor springs on either demo.
    >
    > Sorry, I thought you were talking about this demo:
    >
    > [url]http://director-online.com/havok/demos/demo-dashcar.html[/url]
    >
    > > However, what I am
    > > concluding is that I think they are using 2 custom handlers called
    > > initializeHover and updateHover which is somehow detecting the chassis and its
    > > wheels if they collide or not. I did a test by disabling both of these custom
    > > handlers and by doing so, the chassis would fall through the wheels andland on
    > > the ground instead. On the other hand, if these 2 custom handlers are causing
    > > this effect, then I srill don't understand how the the wheels are following the
    > > chassis. Therefore, I am wondering if it would be easier to use modelsUnderRay
    > > considering that all I am trying to do is do collision detection? What do you
    > > think?
    >
    > Actually, this RayCastCar demo uses modelsUnderRay() for collision
    > detection of the wheels with the ground:
    >
    > -- For each wheel do
    > repeat with i = 1 to pWheelPointList.count
    > pIsHoveringList[i] = false
    > worldWheelPoint = pChassisMDL.transform * pWheelPointList[i]
    > intersectDetails = pMember.ModelsUnderRay(worldWheelPoint,
    > worldDownDir, 2, #detailed)
    >
    > So the physics and control are applied to the chassis and the wheels are
    > just "floating". At which distance should they float is what
    > modelsUnderRay() is used for.
    >
    > This doesn´t mean that you don´t need Havok at all and you can use
    > modelsUnderRay() instead since havok handles all the driving physics and
    > MUR just the distance of the wheels to the chassis.
    >
    > Regards,
    > --
    > Agustín María Rodríguez
    >
    > [url]www.onwine.com.ar[/url] > Macromedia Director demos & code
    ok, Thanks AGustin. The demo link you gave me is a lot easier except
    for one thing. I was wondering if you anyone else could explain its
    math theroy to me considering I do not understand it. Now, just to make
    sure where on the same page the code below is from the Dashpot car
    demo.

    on collision me details
    normalV = details[4]
    axis = 1
    if( abs(normalV[axis]) < abs(normalV[2]) ) then axis = 2
    if( abs(normalV[axis]) < abs(normalV[3]) ) then axis = 3
    normalV = pTurnAxis
    normalV[axis] = 1
    if( 0.01 > (normalV.length - 1) ) then pSurfaceContact =
    pSurfaceContact + 1
    end

    now I understand what abs does and what pSurfaceContact stands for,
    but what are we trying to find so that we know to add 1 to the current
    pSurfaceContact? Meaning could you give me some numbers as an example,
    such as what are some possiblities that normalV[axis] could be? In
    addition, why are we checking to see if we want to use the 2nd axis or
    the third axis? Meaning the part that says....

    if..... then axis =2 or if..... then axis = 3

    roofy Guest

Posting Permissions

  • You may not post new threads
  • You may 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