Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

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

$
0
0

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);
    }

Viewing all articles
Browse latest Browse all 2896

Trending Articles