If i’m walking through a pipe,how to create the shaky effect(in terms of view). In 3Dgames if we walk through a tunnel, the walking effect is depicted as a shaky effect(in terms if view). I want to create something like that.
I’m using glLookAt for viewing. I introduced a variable for y axis(which is my updirection) and i keep adding and subtracting(0.2) alternatively.
zz - variable for walking
yy - variable for shaky effect
Try shaking the reference point in addition to shaking the eye point (not necessarily by the same amount or phase). Also you might want to implement a smoother shaking algorithm, one that continuously (or rather piecewise continuously) oscillates rather than makes discrete steps.
[This message has been edited by DFrey (edited 04-15-2002).]
p is a global pointer and ‘pp’ holds the value 0 or 1. I assigned the pointer to pp in initialising function. but no effect. it always fails in the if condition and executes the else part. so the viewpoint moves away from the model.