WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 10-01-2008, 10:49 PM
whj whj is offline
Member
 
Join Date: Apr 2008
Posts: 60
I do use animationpath.constantspeed when I begin. But what I need to know is not only the initial speed. If I want to accelerate or decelerate a car, I would like to increase or decrease the car based on not the initial speed, but the speed when last timer event triggered.

For example, the initial speed is 20mi/hr. To avoid clash, I calculate certain distance every 20 times a second. While the distance is too close, one car keep speeding up 20 percent and the other car keep slowing down 20 percent. So one car could speed up to
20 + 20*0.2 = 24mi/hr,
24 + 24*0.2 = 28.2mi/hr, (I need to know the current speed is 24)
28.2 + 28.2 *0.2 = 34.56mi/hr, (I need to know the current speed is 28.2)
and so on; and the other car could slow down to
20 - 20*0.2 = 16mi/hr,
16 - 16*0.2 = 12.8mi/hr, (I need to know the current speed is 16)
12.8 - 12.8*0.2 = 10.24mi/hr, (I need to know the current speed is 12.8)
and so on.

Sorry about the trivial details. Do you think it is feasible? Thanks a lot!
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Real Time Audio Data lomendil Vizard 2 06-02-2008 08:18 PM
Can I get real time Intersense tracking data from another computer on the network? GoldenSun Vizard 4 04-30-2008 07:42 PM
timer question Elittdogg Vizard 5 10-10-2007 02:49 PM
Animation Path djdesmangles Vizard 2 06-11-2007 03:37 PM
Animation Path djdesmangles Vizard 0 06-06-2007 11:03 AM


All times are GMT -7. The time now is 01:57 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC