   Semi-Random Movement ?
  Hi guys,What''s a good general way to induce semi-random movement ? I''m just talking about direction (not speed).Should I accelerate a little in a random direction or should I modify the movement vector directly ?I tried adding a fraction of the perpendicular vector to the movement, I used a random fraction and it worked alright but was a little jerky; maybe I have to interpolate between the fractions so it becomes smooth; or maybe that''s just not a good method.I''m looking for a technique that I can set the ''randomness'' to and try out different values, so 0.0 is no change and 1.0 is totally random. I also want the movement smooth, with no abrupt changes in direction.Any ideas ? 
  What is this for exactly? Might make it easier to see what you really want...I'm thinking that if you affect the velocity directly its gonna be really jerky, so best try making the acceleration random I think... But if you make the acceleration change completely randomly every frame (i.e. 100 times per second), your object will stay pretty much still since the average acceleration will be 0.I think if you give a random acceleration and keep it constant for a second, then give a new random acceleration you should get a pretty good smooth movement. But might be a little to predictable, instead you could do this:- assign random acceleration- keep it constant for x seconds- repeatwhere x is the frequency at which you change the acceleration... now if you make the frequency also be a random number between say (0.5 and 2 seconds), that should be pretty unpredictable.As for having a value between 0 and 1 that sets the amount of randomness... well if you just scale your acceleration vector by that value (i.e. multiply):- at 0 your acceleration vector will always be 0- at 1 your acceleration vector will be at its maximum   [edited by - SpaceDude on February 17, 2004 12:32:47 PM];  Hi dude,I''m going to use it for a few things, one is blobs (like the movie the Blob) moving around the floor, and also for particles emitted from some things. That''s why I''m looking for a general technique.It''s probably a lot better to alter the acceleration to avoid jerky movement; the only problem is if the random direction is opposite the velocity because then it would slow down and I don''t want that (at least not right now). So I can only use a random direction that dotted with the velocity would be positive, that should work; and I can just reset the velocity to the same length as the original velocity so I get no speed change.The time based idea is nice, then I can change direction every few seconds.I''ll give it a try now and experiment.Thanks.;  Try adjusting the acceleration by a random amount - don''t change it entirely, just add a random value to the existing acceleration (the random value may be positive or negative). The shifts in acceleration will be gradual so no jerkiness. You will probably want to bias the random values to avoid them cancelling out to zero over time.Richard;  You might want to have a look at this (you''ll need to be able to run Java applets to see the demo).John B ;  oh ok... I see. I was thinking more in terms of like a first person shooter where you want a computer controlled bot to move around randomly so he isn''t an easy target. Well maybe it could work for your case too, I hope so :D ;  Thanks a lot John B,That article is great, from what I learned in it I can implement more stuff than I originally planned.-Endo;  one dimensional perlin noise would be one way to do it. 