Ask a Question related to Macromedia Director 3D, Design and Development.
-
Roofy #1
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
-
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... -
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... -
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... -
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... -
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... -
Roofy #2
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
-
necromanthus #3
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
-
Roofy #4
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
-
necromanthus #5
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



Reply With Quote

