Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gamenewer

Pages: 1 ... 6 7 [8] 9 10 ... 12
106
Support / How to dynamic change the texture U V ?
« on: October 23, 2014, 11:24:54 am »
Hello , I want to do animation action by change texture U V , but I don't know how to do this? any sugestion or sample  , very Thanks !

107
Support / How to caculate the 3d model size ?
« on: October 22, 2014, 04:40:56 am »
Hello Egon,  I load the 3D car model by jpct , I want to get the car width  height and length , int other way, how to get the car's boundingBox? How can I do this?  Thanks very much

108
Support / Re: Question,how to set two camera in jpct?
« on: October 22, 2014, 03:29:02 am »
How about the framerate in this case ?

109
Support / Re: How to set a matrix x angle to zero ?
« on: October 20, 2014, 02:33:20 pm »
You are greate !    set Y  = 0  it's OK ! :)

110
Support / Re: How to set a matrix x angle to zero ?
« on: October 20, 2014, 02:09:13 pm »
if  I  set  posAhead.x=0  , the car will rotate  very strange  and not perform a lookat action,  So it's not right

111
Support / Re: How to set a matrix x angle to zero ?
« on: October 20, 2014, 01:57:06 pm »
Wow,  I perform an  lookat action,  I get the SimpleVector from a curve , and   get this SimpleVector matrix , then set the car by this matrix ,

                        SimpleVector posAhead = way.PointOnPath(xp);   
         SimpleVector poscur = getTransformedCenter();
         posAhead.sub(poscur);
         rotMatrix=posAhead.getRotationMatrix();

                        //here    must set  X angle to 0
                        ???? setXangle = 0 ???
                        //
                        setRotationMatrix(rotMatrix);

112
Support / Re: How to set a matrix x angle to zero ?
« on: October 20, 2014, 11:41:19 am »
I get a matrix  from a vector , I only want to rotate my car by  Y and Z , so I must  set the X angle to 0 , but  I don't know how to set  x angle to 0

113
Support / How to set a matrix x angle to zero ?
« on: October 20, 2014, 11:19:10 am »
Maybe this question is very simple,  but i  don't know how to do so , forgive me

114
Support / Re: About collide cause the framerate drop
« on: October 20, 2014, 03:21:18 am »
I think maybe something wrong in my game,   if the car's speed  is 200km/h ,   framerate is 30 /s , in every  frame  , the car should move

200*1000/(60*60*30)   m  ,   is this right?   

115
Support / Re: About collide cause the framerate drop
« on: October 17, 2014, 11:22:17 am »
I'm so sorry ,  the reason is I use the particle by a wrong way,  about 200 particles are visible in the world.  I change they are invisible , the framerate is Ok now (30fps) .   :)

Another question:  about the camera  follow the  player (car) , I use the code take from the car example,  when the car translate fast , the distance between camera and player  is becomes far ,  I want  the camera near the player , change the offset , but no effect , I don't know why?  How to ajust it by car speed ?  Thanks a lot !

final  float  Voffset = 8.6f;
final  float  Hoffset = 50f;

               Camera camera = world.getCamera();

          // Making this interpolation based on ticks fixes the jitter on low fps
           SimpleVector center=player.getTransformedCenter();
          
           SimpleVector oldCamPos=camera.getPosition();
           SimpleVector oldestCamPos=new SimpleVector(oldCamPos);
           oldCamPos.scalarMul(4f);

           SimpleVector camPos=new SimpleVector(center);
           SimpleVector zOffset=player.getZAxis();
           //SimpleVector yOffset=new SimpleVector(0, -18*zoomFactor*zoomFactor, 0);//50 (10)
          
           SimpleVector yOffset=new SimpleVector(0, -Voffset*zoomFactor, 0);
           //zOffset.scalarMul(-80f*zoomFactor*zoomFactor); //70
           /*if(player.speed != 0)
               zOffset.scalarMul(-30f*zoomFactor); //70
           else
              zOffset.scalarMul(-30f*zoomFactor);
           */
           //if(player.speed > 0)
           //   zOffset.scalarMul(-50f*zoomFactor /player.speed);
           //else
           /*
           if(player.speed == 0)
               zOffset.scalarMul(-Hoffset*zoomFactor);
           else
              zOffset.scalarMul(-Hoffset*player.maxSpeed/(player.speed) );
           */
           zOffset.scalarMul(-Hoffset*zoomFactor);
          
           camPos.add(zOffset);
           camPos.add(yOffset);

           camPos.add(oldCamPos);
           camPos.scalarMul(0.2f); //0.2f  1/(4+1)

           SimpleVector delta=camPos.calcSub(oldestCamPos);
           float len=delta.length();

           if (len!=0) {
              camera.moveCamera(delta.normalize(), len);
           }

           camera.lookAt(center);
 

116
Support / Re: About collide cause the framerate drop
« on: October 16, 2014, 03:29:13 am »
Only cars with each other,  If there any idea to  improve collider ?  Such as simple box collider...

117
Support / About collide cause the framerate drop
« on: October 15, 2014, 11:54:15 am »
Helloe Egon, I add 10 cars in my game , each car set  setCollisionMode(Object3D.COLLISION_CHECK_SELF|Object3D.COLLISION_CHECK_OTHERS);
and add  addCollisionListener(carCollision);    and called checkForCollisionSpherical  every frame,  I found the framerate droped huge , about 23 fps, normal  is 30fps , Could you help me to  improve the collision perfomace ?   very thanks  :)

118
Support / Re: How to convert .ser file to an obj file?
« on: October 13, 2014, 07:57:18 am »
Thanks for your help !

119
Support / How to convert .ser file to an obj file?
« on: October 12, 2014, 11:53:40 am »
Hello Egon,  I  get some .ser file  and I want to convert them to obj file , but I don't know how to do this , can you help me ? Thanks very much ! :)

120
Support / Re: How to improve the jpct lib load speed?
« on: September 26, 2014, 02:19:21 pm »
I used  the HTC droid increadable  , it's  very old!  Thanks you for your help :)

If  load default shader not from zip file ,   maybe save time ?   and how to do this ?

Pages: 1 ... 6 7 [8] 9 10 ... 12