0 registered members (),
17,758
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
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
OP
Member
|
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
OP
Member
|
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: Marco_Grubert]
#43541
03/31/05 06:51
03/31/05 06:51
|
Joined: Nov 2004
Posts: 113 canada EH!?
zammmm
OP
Member
|
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".
--------------------
|
|
|
|