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,258 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Problem moving a model that is a PH_BOX type (no tires) #359686
02/19/11 05:22
02/19/11 05:22
Joined: Sep 2006
Posts: 36
Tempe, AZ
B
bpc31 Offline OP
Newbie
bpc31  Offline OP
Newbie
B

Joined: Sep 2006
Posts: 36
Tempe, AZ
This code worked in the A7 physics but I can't get any movement using the same lines in A8 physX. I don't get errors but my code must still be wrong for A8?

Code:
pXent_settype(my, PH_RIGID, PH_BOX);
pX_setgravity( earth_gravity );
pXent_setmass(my, 6.5);
pXent_setfriction(my,20);        
pXent_setelasticity(my, 10);
pXent_setdamping(my, 50, 50);

while(1)
{	
if(key_cuu == 1)
vec_set(temp, my); vec_normalize(temp, 0);
pXent_addforcelocal(my, vector(20000,0,0), nullvector);
}



Last edited by bpc31; 02/19/11 05:29.
Re: Problem moving a model that is a PH_BOX type (no tires) [Re: bpc31] #359870
02/19/11 21:43
02/19/11 21:43
Joined: Sep 2006
Posts: 36
Tempe, AZ
B
bpc31 Offline OP
Newbie
bpc31  Offline OP
Newbie
B

Joined: Sep 2006
Posts: 36
Tempe, AZ
I just added physX_open() to my main() but now when I press the up arrow the model moves at light speed off my terrain...Can anyone tell if my physics values are completely wrong?

Re: Problem moving a model that is a PH_BOX type (no tires) [Re: bpc31] #359880
02/20/11 00:28
02/20/11 00:28
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
vec_set(temp, my);

my is not a vector, it is a pointer to a entity.
And you define temp as vector?


Moderated by  HeelX, Spirit 

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