Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, VoroneTZ), 1,507 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Motorrad problem #340690
09/06/10 18:25
09/06/10 18:25
Joined: Dec 2008
Posts: 222
janerwac13 Offline OP
Member
janerwac13  Offline OP
Member

Joined: Dec 2008
Posts: 222
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;

}

}


...

Re: Motorrad problem [Re: janerwac13] #340692
09/06/10 18:36
09/06/10 18:36
Joined: Oct 2009
Posts: 149
Germany
M
muffel Offline
Member
muffel  Offline
Member
M

Joined: Oct 2009
Posts: 149
Germany
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

Re: Motorrad problem [Re: muffel] #340693
09/06/10 18:40
09/06/10 18:40
Joined: Dec 2008
Posts: 222
janerwac13 Offline OP
Member
janerwac13  Offline OP
Member

Joined: Dec 2008
Posts: 222
ok thx

Re: Motorrad problem [Re: janerwac13] #340694
09/06/10 18:44
09/06/10 18:44
Joined: Dec 2008
Posts: 222
janerwac13 Offline OP
Member
janerwac13  Offline OP
Member

Joined: Dec 2008
Posts: 222
is there another way for a solution ?

Re: Motorrad problem [Re: janerwac13] #340695
09/06/10 18:50
09/06/10 18:50
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
add a torque


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1