|
Re: need physic
[Re: MagZu]
#65870
03/10/06 10:08
03/10/06 10:08
|
Joined: Oct 2003
Posts: 1,550 United Kingdom
indiGLOW
Serious User
|
Serious User
Joined: Oct 2003
Posts: 1,550
United Kingdom
|
Its just missing the phent_enable(my,1) to turn the physics on.
The Art of Conversation is dead : Discuss
|
|
|
Re: need physic
[Re: MagZu]
#65872
03/10/06 14:39
03/10/06 14:39
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
Hi!
I think phent_enable(my,1) isn't nessesery within this simple case (I've nerver used it and it works), but as answered in an other task: you'll need commercial or pro-version to use 1 (com) or more (pro) physical objects. Otherwise use the newton-engine. It's well documented and i think you can read?
mercuryus
|
|
|
Re: need physic
[Re: MagZu]
#65874
03/10/06 16:35
03/10/06 16:35
|
Joined: Feb 2006
Posts: 44 Norway
MagZu
OP
Newbie
|
OP
Newbie
Joined: Feb 2006
Posts: 44
Norway
|
how do i fix that code so i get it like a crate
Code: ___________________________________________________________________
var earthgravity[3] = 0,0, -300; // The amount of Gravity Force entity* boulderm;
action obelisk //If You Own Commercial Edition, keep the action like this { wait(1); }
action obelisk //If You Own Professional Edition, keep the action like this { phent_settype(my, PH_RIGID, PH_poly); // sets the object within the physics engine ph_setgravity ( earthgravity ); phent_setmass(my, 120, PH_BOX); phent_setfriction(my,7); phent_setelasticity(my, 10, 10); } ______________________________________________________________________
|
|
|
Re: need physic
[Re: MagZu]
#65875
03/10/06 19:34
03/10/06 19:34
|
Joined: Oct 2003
Posts: 1,550 United Kingdom
indiGLOW
Serious User
|
Serious User
Joined: Oct 2003
Posts: 1,550
United Kingdom
|
Here's my code: Code:
ph_setgravity (vector(0,0,-300)); phent_settype(my, PH_RIGID, PH_BOX); // sets the object within the physics engine phent_enable(my, 1); // I guess this is set to 1 by default when you set type? phent_setmass(my, 5, PH_BOX); phent_setfriction(my,25); phent_setelasticity(my, 30, 10);
Try that
The Art of Conversation is dead : Discuss
|
|
|
Re: need physic
[Re: MagZu]
#65877
03/11/06 13:06
03/11/06 13:06
|
Joined: Oct 2003
Posts: 1,550 United Kingdom
indiGLOW
Serious User
|
Serious User
Joined: Oct 2003
Posts: 1,550
United Kingdom
|
Np - The main problem I encountered with your code was that it appeared the crates were to heavy, this seems to be a recuring problem, I had it with my car physics, the chasis was much to heavy and the wheel constraints don't seem to be designed for huge weights. ...Of course its just a simple case of moving a few decimal places around and scaling your weights accordingly.... Anyway glad it worked
The Art of Conversation is dead : Discuss
|
|
|
|