Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (3run, AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip), 605 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 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