Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Ayumi, NewbieZorro, TipmyPip), 13,888 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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