Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Petra, AndrewAMD, Quad, VoroneTZ, 1 invisible), 488 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: need physic [Re: MagZu] #65869
03/09/06 16:55
03/09/06 16:55
Joined: Feb 2006
Posts: 44
Norway
M
MagZu Offline OP
Newbie
MagZu  Offline OP
Newbie
M

Joined: Feb 2006
Posts: 44
Norway
the crates does not have physic with that script how does i fix that so it has physic

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 Offline
Serious User
indiGLOW  Offline
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: indiGLOW] #65871
03/10/06 13:50
03/10/06 13:50
Joined: Feb 2006
Posts: 44
Norway
M
MagZu Offline OP
Newbie
MagZu  Offline OP
Newbie
M

Joined: Feb 2006
Posts: 44
Norway
dosent work

Re: need physic [Re: MagZu] #65872
03/10/06 14:39
03/10/06 14:39

A
Anonymous
Unregistered
Anonymous
Unregistered
A



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: ] #65873
03/10/06 15:07
03/10/06 15:07
Joined: Feb 2006
Posts: 44
Norway
M
MagZu Offline OP
Newbie
MagZu  Offline OP
Newbie
M

Joined: Feb 2006
Posts: 44
Norway
Mercury you got that script we talked about last night?

Re: need physic [Re: MagZu] #65874
03/10/06 16:35
03/10/06 16:35
Joined: Feb 2006
Posts: 44
Norway
M
MagZu Offline OP
Newbie
MagZu  Offline OP
Newbie
M

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 Offline
Serious User
indiGLOW  Offline
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: indiGLOW] #65876
03/10/06 21:31
03/10/06 21:31
Joined: Feb 2006
Posts: 44
Norway
M
MagZu Offline OP
Newbie
MagZu  Offline OP
Newbie
M

Joined: Feb 2006
Posts: 44
Norway
thx for your help it worked

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 Offline
Serious User
indiGLOW  Offline
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
Page 2 of 2 1 2

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