substituting Havok's linear velocity

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

  1. #1

    Default substituting Havok's linear velocity

    Hi there all,
    could any one explain to me how I could calculate how much the wheels of a car
    should spin according to how fast the car is going without using Havok? I ask
    this because I am not using Havok, therefore I can not use the

    forwardVel = worldForwardDir * pChassisRB.linearVelocity

    ... method that havok uses considering that I do not know another way how to
    get the chassis's linearVelocity.

    Roofy Guest

  2. Similar Questions and Discussions

    1. Substituting slideshows on a draft page
      HI There, I use contribute to manage an arts website www.tairawhitiarts.net, where I am often uploading new pages to the site. I use the save as a...
    2. Substituting a still image for FLV
      I have FMS2, profile 1, limited to 150 concurrent license connections. Question: if user number 151 hits the web page, my video box will not...
    3. Substituting 0 with empty string
      Hi i have a list of objects which I bind to a datagrid Some of the columns are decimal type and in the database many of the values are 0. But I...
    4. cursor velocity
      Hi, Anyone has idea how to get parameter of cursor's velocity? There's no problem to get positions but velocity is difficult. I've tried with...
    5. dynamically substituting variable name
      hi, I want to dynamically substitute a variables name. I know this from PHP where you can have somthing like ${$foo} how can I do this in...
  3. #2

    Default Re: substituting Havok's linear velocity

    Ok, I got some information from the internet, and basically it says that I
    would need to know the speed of the car, the radius of the wheels and the
    circonfrence of the wheels. However, I am back to square one because from
    looking at any of the havok demos that I have downloaded they all show one way
    on how to get the speed of the chassis by doing this...

    currentVel = pChassisRB.linearVelocity
    currentSpeed = currentVel.dot(worldForward)

    as you can see, again the havok linearVelocity function is being used along
    with getting the dotproduct of worldForwardDirection which causes a problem
    since I am not using havok to retrieve the chassis's linearVelocity. In
    addition, I have spent a few days searching on the internet on how to find
    linearVelocity, but all of the web articles that I have found, its end results
    becomes a scalar. However, in Havok, I noticed that their type of
    linearVelocity is a vector. So I am really lost in the dark, and I would
    appreciate it if anyone could help me out to find the chassis's current speed.


    Roofy Guest

  4. #3

    Default Re: substituting Havok's linear velocity

    R = wheel radius
    speed = Distance per frame (if your speed is shown as distance/second
    or distance/hour, check out the FPS value)
    Presuming your model is exported from 3DSMax:

    member("whatever").model("wheel").rotate(0, (360*D)/(6.28*R), 0)

    note: in case of very high speed, pay attention to rotations over 179 degrees
    per frame (you'll get 'unexpected' results).
    You have to divide them into a sequence of smaller rotations (in the same
    frame !)
    cheers

    necromanthus Guest

  5. #4

    Default Re: substituting Havok's linear velocity

    Thanks necromanthus
    But I have one question. Where are getting 6.28 * R from? Is that for the formula 2 * pi * radius. I ask this because I think my wheels are spining too fast
    Roofy Guest

  6. #5

    Default Re: substituting Havok's linear velocity

    [q]Originally posted by: Roofy
    Thanks necromanthus
    But I have one question. Where are getting 6.28 * R from? Is that for the
    formula 2 * pi * radius. I ask this because I think my wheels are spining too
    fast[/q]

    wheel circumference = 2 * PI * R = 6.28 * R
    The get the right speed you have to put in a frame script the both
    motions:
    member("whatever").model("car").translate(D, 0, 0)
    member("whatever").model("wheel").rotate(0, (360*D)/(6.28*R), 0)


    Don not use the keyframe player to move the car because it works asynchronous !
    cheers





    necromanthus 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