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
1 registered members (TipmyPip), 18,449 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
Cutting and falling trees #78802
06/21/06 06:26
06/21/06 06:26
Joined: May 2002
Posts: 611
Germany => Bavaria => Unterfra...
LordRathan Offline OP
User
LordRathan  Offline OP
User

Joined: May 2002
Posts: 611
Germany => Bavaria => Unterfra...
This is the first time I use the physic engine (commercial = 1 object). The goal is that the player cuts a tree, and then the physic engine let the tree fall to the ground. The ground itself is a model, too.



The cutting itself is not the problem. It works fine. After cutting, the tree morphs to a stump and the stump creates the cuttet tree above it. So we have two objects, the stump and the cuttet tree. Now the physic engine takes control over the cutted tree part.

Code:

var[3] erdanziehung = 0, 0, -368;

function cutted_tree()
{
my.polygon = on;

phent_settype(my, ph_rigid, ph_poly);
phent_setmass(my, 10, ph_poly);
phent_setdamping(my, 0, 0);
phent_setgroup(my, 1);
ph_setgravity(erdanziehung);
ph_selectgroup(1);
}



The problem I have is that the physicobject jumps wild through the area and then dissapears. It is not really gone, but I don't know where it is. I have set the mass to more and to less than 10, and I already modified the gravity to more and less than -368. These actions didn't solve the problem.

Any suggestions?

Re: Cutting and falling trees [Re: LordRathan] #78803
06/21/06 10:29
06/21/06 10:29

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Hi!

Will be a rubber tree !

Look at phent_setdamping(my, 0, 0) in the manual.
The second and last parameter sets the damping (0..100).

DE: phent_setdamping: Parameter 2 und 3 sind für die Reibung zuständig.

mercuryus

Last edited by mercuryus; 06/21/06 10:31.
Re: Cutting and falling trees [Re: ] #78804
06/21/06 10:51
06/21/06 10:51
Joined: May 2002
Posts: 611
Germany => Bavaria => Unterfra...
LordRathan Offline OP
User
LordRathan  Offline OP
User

Joined: May 2002
Posts: 611
Germany => Bavaria => Unterfra...
Quote:

Will be a rubber tree !






Thank you, I'll check that.

EDIT: After playing with the values it seems, that the tree now jumps slower. I've set the dumping-values both to 100, or the first to 50 and the second to 100. I also changed the gravity-value between 700 and 10000. It's not the right solution yet.
When I set the ph_settype to cylinder-hulltype, than the engine crashes. Strange...

EDIT2:
My Rubbertree: Video (Avi, ~ 5MB)

Last edited by LordRathan; 06/21/06 11:43.
Re: Cutting and falling trees [Re: LordRathan] #78805
06/21/06 13:09
06/21/06 13:09

A
Anonymous
Unregistered
Anonymous
Unregistered
A



Maybe you should change the topic of your game: CATCH THE RUBBERTREE!!!

ph_settype "cylinder-hulltype" don't work. Only poly and box work.
Try to keep the polycount low. (Or hull the tree in a invisible lowpoly-model, animate this one and connect the origin tree by application)

Try phent_setelasticity ( entity, var bounciness, var minimumSpeed );
It is responsible for the bounciness. See manual for more details...


EDIT: Have you attached a script (action) to the tree?
Would you show it? - The distance/speed in the video is very strange!


mercuryus

Last edited by mercuryus; 06/21/06 13:18.
Re: Cutting and falling trees [Re: ] #78806
06/21/06 13:16
06/21/06 13:16
Joined: May 2002
Posts: 611
Germany => Bavaria => Unterfra...
LordRathan Offline OP
User
LordRathan  Offline OP
User

Joined: May 2002
Posts: 611
Germany => Bavaria => Unterfra...
Thank you again. I'll test that and write again, if I have more problems.

Re: Cutting and falling trees [Re: LordRathan] #78807
06/21/06 14:07
06/21/06 14:07
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
maybe you need to place the upper part a little more away from the stump? if both objects are touching when you initiate the physics it will behave like you described

Re: Cutting and falling trees [Re: ello] #78808
06/21/06 14:14
06/21/06 14:14
Joined: May 2002
Posts: 611
Germany => Bavaria => Unterfra...
LordRathan Offline OP
User
LordRathan  Offline OP
User

Joined: May 2002
Posts: 611
Germany => Bavaria => Unterfra...
That may a reason, too.


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