1 Reply Latest reply on Jul 2, 2006 10:54 AM by Roofy

    2 Havok problems

      I hate to bug you guys again, but I am still having some serious problems. Basically the problem is this...
      Firstly, so that everyone knows which 2 behaviour scripts I am using, they are the create terrain behaviour script which I copied from the raycast jeep demo and the rayCast script which I copied off from the Remote Control Car demo. In other words, my project consist of 3d scenery that just consist of my car, there is no hke file, and what is attached to my 3d sprite are the following behaviours in this order

      1. The Havok (no HKE) script

      2. The create terrain script --> remember, this is the same script that is used in the raycast jeep demo which you will find here http://director-online.com/havok/xdev/docs.html

      3. The RayCast Script --> remember, this is the same script that is used in the Remote Control Car Demo which you will find here http://director-online.com/havok/demos/demo-cardemo.html

      after running this script, and as soon as the wheels touch the ground, the chassis and the wheels fly all over the place. So my first question is this....

      1. how do I stop the chassis and the wheels from flying all over the place? I really do not know how to set my settings considering that not only do I not understand Havok, but I do not even know that much about physics.

      2. Second question is this, I wanted to know why the demo is casting a ray off of some sort of wheelPointList calculation insetad of just casting the ray off of the wheels worldPositions? For example,

      the script uses this....
      repeat with a = 1 to pWheelPointList.count
      pIsHoveringList[a] = false
      worldWheelPoint = tempTrans2 * pWheelPointList[a]
      intersectDetails = pMember.ModelsUnderRay ( worldWheelPoint, \
      worldDownDir, \
      6, \

      and I want to know why I can't just do this....
      ... note pWheelList would stand for the 4 wheel models built into a list that would be set when initializeHover was called

      repeat with a = 1 to pWheelList.count
      pIsHoveringList[a] = false
      intersectDetails = pMember.modelsUnderRay(pWheelList[a].worldPosition, worldDownDir, 6, #detailed

      if you need the entire script then let me know and I will post it here. Otherwise if anyone could help I would appreciate it.
        • 1. Re: 2 Havok problems
          Roofy Level 1
          Ok, I tried tweeking things by turning some of the lines of code to comments which will disable it from being called. After disabling and reabling lines of code I found out that by disabling the applyForceAtPoint at least that stopped the chassis and the wheels from flying all over the place. However, the first try after disabling the force, the car would not move. So then I increased the accereation, and after holding the up arrow for about a second, the car jigggled a bit and then sped off like 200 mph, sort of like someone was holding down the car and then releasing it. So how can I get the car to move forward like a car is suppose to move?

          and BTW I would still like to know my second question from the above post