Problem with physik and objekt move

Posted By: NovaTech2010

Problem with physik and objekt move - 11/27/10 18:36

Hi ^^
I have a problem with my physik... .
I want to use physik on my playermodel, but if i press of a or d the model steer not with the pan-corner.

Here my Script:
------------------------------------------------------------
action playeraction()
{
player = me;
c_setminmax(me);
my.POLYGON = ON;
my.ENABLE_BLOCK = ON;
my.ENABLE_ENTITY = ON;
my.event = player_event;

player.lightrange = 75;
player.LIGHT = ON;
player.red = player_light; my.blue = player_light; my.green = player_light;

phent_settype (player, PH_RIGID, PH_BOX);
phent_setmass (player, 1, PH_POLY);
phent_setfriction (player, 80);
phent_setdamping (player, 70, 10);
phent_setelasticity (player, 20, 10);


my = target;
var cam_ang[3];
vec_diff(temp,nullvector,cam_dist_fern);
vec_to_angle(cam_ang,temp);
cam_ang.roll = 0;
cam_ang.tilt = -30;

while(1)
{
if(mouse_middle){player_speed = 2;}else{player_speed = 30;}

if(key_w){phent_addvelcentral(player,vector(player_speed * time_step, 0, 0));}
if(key_s){phent_addvelcentral(player,vector(-player_speed * time_step, 0, 0));}

vec_set(camera.x,cam_dist_fern);
vec_rotate(camera.x,player.pan);
vec_add(camera.x,player.x);
vec_set(camera.pan,cam_ang);
ang_add(camera.pan,player.pan);

if(key_a){player.pan += 50 * time_step;}
if(key_d){player.pan -= 50 * time_step;}

wait(1);
}
}

------------------------------------------------------------

So, i hope i make not circumstances.

Thanks

NovaTech2010

P.S.: Sry, my English is not very good ^^'
Posted By: 3run

Re: Problem with physik and objekt move - 11/27/10 20:34

If you are trying to make FPS player movement, you better use C_MOVE instead of ODE physics. But in A8, there is a special function to make player movement with PhysX.
Posted By: NovaTech2010

Re: Problem with physik and objekt move - 11/27/10 20:38

So in A7 movements with physics are not possible?
Posted By: 3run

Re: Problem with physik and objekt move - 11/27/10 21:16

For human movement I guess not.
But you can make really good looking movement with 'C_MOVE'.
Posted By: NovaTech2010

Re: Problem with physik and objekt move - 11/27/10 22:18

Okay.
I produce so the grafitaty and the movements of figures with c_move.
I will keep come on.

I thank =)
Posted By: tasha19

Re: Problem with physik and objekt move - 12/02/10 11:07

hi. since you guys are talking about the movement of the object how do you suggest clicking a certain piece and moving it to the next block? for example, in chess. you click the object and putting it on a specific block?? we dont actually know where to start.. thanks!
Posted By: 3run

Re: Problem with physik and objekt move - 12/02/10 12:18

Make a new thread for that please.
© 2024 lite-C Forums