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
0 registered members (), 18,008 guests, and 5 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
new with physics, need some help #43538
03/31/05 00:10
03/31/05 00:10
Joined: Nov 2004
Posts: 113
canada EH!?
zammmm Offline OP
Member
zammmm  Offline OP
Member

Joined: Nov 2004
Posts: 113
canada EH!?
Hello, I got bored and decided to learn the physics engine, hehe. So I figured out you define phent inside of actions or to a entity through say ent create, but where do i put the ph objects. (ph_setgravity i think) Right now when i walk into my box it kinda stumbles then floats up, becuase i got no gravity im guessing, where do i define it? In another function? thanks..

Code:
action physics_box {

phent_settype( my, ph_rigid, ph_box );
phent_setmass ( my, 2.5, ph_box ); }




-- Send me a shout at zammmm@gmail.com, also got MSN messenger, Xbox Live, "random FIRE", Xfire, "zammmm" and Steam, "zammmm". --------------------
Re: new with physics, need some help [Re: zammmm] #43539
03/31/05 00:25
03/31/05 00:25
Joined: Nov 2004
Posts: 113
canada EH!?
zammmm Offline OP
Member
zammmm  Offline OP
Member

Joined: Nov 2004
Posts: 113
canada EH!?
well, i got gravity now, i just needed to define a vector variable, but how can i stop the bouncing and flying around soon as i like tap it? thanks

Code:
var earthgravity[3] = 0,0, -386;

action physics_box {

ph_setgravity(earthgravity);

phent_settype( my, ph_rigid, ph_box);
phent_setmass ( my, 50, ph_box ); }




-- Send me a shout at zammmm@gmail.com, also got MSN messenger, Xbox Live, "random FIRE", Xfire, "zammmm" and Steam, "zammmm". --------------------
Re: new with physics, need some help [Re: zammmm] #43540
03/31/05 06:19
03/31/05 06:19
Joined: Sep 2003
Posts: 3,236
San Diego, CA
M
Marco_Grubert Offline
Expert
Marco_Grubert  Offline
Expert
M

Joined: Sep 2003
Posts: 3,236
San Diego, CA
Don't run into physics objects. Instead use the phent_* commands to push/turn them (phent_addcentralforce, addtorque, etc.)

Re: new with physics, need some help [Re: Marco_Grubert] #43541
03/31/05 06:51
03/31/05 06:51
Joined: Nov 2004
Posts: 113
canada EH!?
zammmm Offline OP
Member
zammmm  Offline OP
Member

Joined: Nov 2004
Posts: 113
canada EH!?
So say if I want a box to move when I run into it, Id set the mass, gravity, and type then add central force to it and it will just move in the direction? It says in the manual to give gravity a nullvector, but then wouldnt it take off if I hit it to hard?


-- Send me a shout at zammmm@gmail.com, also got MSN messenger, Xbox Live, "random FIRE", Xfire, "zammmm" and Steam, "zammmm". --------------------

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