Motorrad problem

Posted By: janerwac13

Motorrad problem - 09/06/10 18:25

Hi,
Ich habe mir den Code aus dem AUM für das Motorad genommen.
Das Motorad habe ich nun als Phsik objekt. Nur ich bekomme die lenkung nicht hin irgendwas ist da noch falsch !

action my_bike() // attach this action to your bike model

{
var movement_speed = 0; // initial movement speed

var rotation_speed = 3; // rotation speed

VECTOR bike_speed, temp;
VECTOR speed;
var walk_percentage;
var death_percentage;
player = me;
kamera();
phent_settype (my, PH_RIGID, PH_BOX);
phent_setmass (my, 1, PH_BOX);
phent_setfriction (my, 50);
phent_setdamping (my, 10, 50);
phent_setelasticity (my, 5, 1);
ph_setgravity (vector(0, 0, -386));
while (1)
{
my.pan += rotation_speed * (key_a - key_d) * time_step;
if (key_d) // the player has pressed the left cursor key?

{

if (my.roll > -30)

{

my.roll -= 35 * time_step;

}

}



if (key_a) // the player has pressed the right cursor key?

{

if (my.roll < 30)

{

my.roll += 35 * time_step;

}

}


...
Posted By: muffel

Re: Motorrad problem - 09/06/10 18:36

There is one simple reason if an Entity is registered as an PhysX-object it's not allowed to change the orientation and position of the Entity

muffel
Posted By: janerwac13

Re: Motorrad problem - 09/06/10 18:40

ok thx
Posted By: janerwac13

Re: Motorrad problem - 09/06/10 18:44

is there another way for a solution ?
Posted By: painkiller

Re: Motorrad problem - 09/06/10 18:50

add a torque
© 2024 lite-C Forums