"Greg M. Johnson" wrote:
> In my systems,
> #declare velocity=velocity-0.1*y;
> is how I usually do gravity.
IMHO I think my advice is the best here for frame-by-frame pov coding of gravity.
> #declare velocity=velocity-dragconstant*velocity^2;
> where dragconstant=0.005; //for starters
Oops! an error above.
// for a frame-by-frame system, experiment with small numbers for drag; toss
textbook values in dustbin.
#declare dragconstant=0.005;
// Wind is some varying vector.
#declare wind=foo;
// Wind blowing at craft means double effect; blowing with craft negates
effect.
#declare netdirection=wind-velocity;
// I forgot that velocity was a vector in last version I shared.
#declare
velocity=velocity+vnormalize(netdirection)*dragconstant*vlength(netdirection)^2;
Post a reply to this message
|