(PeasyCam lib) how to make easeout for CameraState transition?

edited August 2017 in Library Questions

I try to use keyboard to control camera rotation / position , Here I use get/setState( ),But this generate linear transition , Is there any way to make easeout transition?

   import peasy.*;
    PeasyCam  cam;
    CameraState state;
    void setup(){ 
      size(400,400,P3D);
      cam=new PeasyCam(this,300);
      state=cam.getState();
    }
    void draw(){  
      box(80);
    }
    void keyPressed(){
       if(key=='s')
          state = cam.getState();
       if(key=='r')
          cam.setState(state);
    }
Sign In or Register to comment.