### 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 ... 9 10 [11] 12
151
##### Support / Re: About the object "LookAt" , need help
« on: June 10, 2014, 02:20:48 am »
Hello EgonOlsen,  I use code like this:

//get the car current  position
SimpleVector poscur = car.getTransformedCenter();

//get the car lookat waypoint , the  nav point is ahead of car
SimpleVector posLookat = getLookatwaypoint();

posLookat .scalarMul(-1f);
Matrix rotY=posLookat .getRotationMatrix();
car.setRotationMatrix(rotY);

If  I change code  as follow:
.....
poscur .scalarMul(-1f);
Matrix rotY=poscur .getRotationMatrix();
car.setRotationMatrix(rotY);

the effect is  the car 's forward becomes back , please look at the attache picture ,
How can I do ?  thank s   ~

[attachment deleted by admin]

152
##### Support / About the object "LookAt" , need help
« on: June 09, 2014, 05:17:06 pm »
I reference   this topic -   Simulate "camera.lookAt(SimpleVector)" for an Obje ,   set my car rotation matrix, but  it's not ok ,the  car's wheels are up,
what's wrong ?   help me , please ,thanks  ...

[attachment deleted by admin]

153
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: June 08, 2014, 04:41:32 pm »
Hello !  I can use camera  "walk along" the road ,it seems ok.  Now , I add a car into the world and let the camera  follow it , the car's position set by

SimpleVector pos = waypoint[WayID];
car.clearTranslation();
car.translate(pos);

the camera position set by

pos.x -=2;
pos.y += 60;
pos.z -= 40;

cam.setPosition(pos);

but  the car  position is seems not ok ,   it somtimes lost on road,  camera is always ok , because I  always "walk along" the road  , I try to find object3d  setposition function , but  I only found  translate function , please help me , thanks !

154
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: June 03, 2014, 02:38:29 am »
thanks ,I will try it   ~~

155
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 31, 2014, 02:16:14 am »
sorry ,still incorrect  means that  I want to walk along the road , I always see the road ,but the result is not always on the road and sometimes the road not seen ....

156
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 30, 2014, 05:11:31 pm »
The model export from unity3d  and  changed type by 3dsmax,   I  can see the road and waypoint in application, the picture is captured from my handset

[attachment deleted by admin]

157
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 30, 2014, 04:33:10 pm »
Here is  my used  3d model , the way point named WP_1 WP_2 .... WP_43

[attachment deleted by admin]

158
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 30, 2014, 04:25:56 pm »
HI,  I  do a  simple test,  the "walk step" is 1, when I  click the screen ,the WayID ++,  set camera position like this:

but the camera position still incrocrect,  I don't know why?

I  load 3d model like this:

try
{

}
catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

saidao.rotateX((float) (Math.PI) / 1f);
saidao.translate(0,10,0);
saidao.build();

int k = 0;
for(int i = 0; i < obj.length; i++){
if(obj.getName().contains("WP_")){
obj.build();
waypoint[k] = obj.getTransformedCenter();

wayNav[k] = obj;
k++;
Logger.log(obj.getTransformedCenter() + "-->GET WP->"+obj.getName());
}
{
}

}

the  print is :
05-30 22:06:30.230: I/jPCT-AE(886): (-412.28714,1.8050749,1105.2081)-->GET WP->WP_1_jPCT1
05-30 22:06:30.230: I/jPCT-AE(886): Normal vectors calculated in 1ms!
05-30 22:06:30.230: I/jPCT-AE(886): (-482.62927,1.3220211,1107.2769)-->GET WP->WP_2_jPCT2
05-30 22:06:30.230: I/jPCT-AE(886): Normal vectors calculated in 1ms!
05-30 22:06:30.230: I/jPCT-AE(886): (-625.3562,1.3489301,1113.7605)-->GET WP->WP_3_jPCT3
.....................

Is there is something wrong ? thanks

159
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 30, 2014, 03:47:01 pm »
thank you very much !  I will try it soon  and give the result ...

160
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 30, 2014, 02:59:01 pm »
Maybe my poor english...                  I have got the waypoint from 3d model ,  and I  set the camera position like this:

Camera cam = world.getCamera();

SimpleVector p = waypoint[WayID];

p.y -= 20;
p.z -= 100;
cam.setPosition(p);

but it seems the camera position is not correct(it should always on the road ,like a man walk on the road) ,  My purpose is to "walk along" on road so  my car can to do so,
sorry  for my poor english~~

161
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 30, 2014, 02:56:44 am »
I want  my car  run along the road,and the camera follow the car , like this:

[attachment deleted by admin]

162
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 30, 2014, 02:42:04 am »
I can't walk along the way by way point, it seems the carmera position  not incrocet

163
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 29, 2014, 04:17:32 pm »
The log seems  ok

164
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 29, 2014, 03:35:42 pm »
I add waypoint in 3D mode, the waypoint as the children of road, I  load the road  like this;

Object3D[] obj;
for(int i = 0; i < obj.length; i++){
if(obj.getName().contains("WP_")){
obj.build();
waypoint[k] = obj.getTransformedCenter();

wayNav[k] = obj;
k++;

}

so the waypoint postion are got

165
##### Support / Re: Could someone tell me how to use jpct-ae realize the attached car racing game?
« on: May 29, 2014, 01:59:49 pm »
Anyone help  me?

Pages: 1 ... 9 10 [11] 12