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,388 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
Crash #108867
01/24/07 21:27
01/24/07 21:27
Joined: Aug 2005
Posts: 155
USA San Diego CA
Scramasax Offline OP
Member
Scramasax  Offline OP
Member

Joined: Aug 2005
Posts: 155
USA San Diego CA
This function works great when the define of 'genGravity'is set at 10 but crashes WED or the Script editor when I set it to 100 when the object collides with the ground. (mdl IceX2.0 generated.) Has anyone seen this in the past or have an idea of what's going on?

(6.40.5 Pro)
Code:
 
function addToPhysics()
{
my.passable =OFF;
phent_settype(my,
PH_RIGID, // rigid entity
PH_SPHERE); // collision hull
phent_setmass(my,
10, // mass
PH_SPHERE); // hulltype (shape of object for rotational behavior)
var linear = 10;
var angular = 10;
phent_setdamping(my, linear, angular);

phent_setgroup(my, 2); // group of object

phent_setelasticity(my,
40, // bounciness (0..100)
0); // minimum speed

ph_setgravity(vector(0,0,-genGravity)); // earth gravity
phent_clearvelocity(my);

ph_selectgroup(15); // active group 2 objects

// phent_enable(my, OFF);
phent_clearvelocity(my);
}



Last edited by Scramasax; 01/24/07 21:29.

www.moxiefish.com George Lancaster
Re: Crash [Re: Scramasax] #108868
02/05/07 19:07
02/05/07 19:07
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline
Member
zwecklos  Offline
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Hi there
Have you tried to put the ph_setgravity to the begining of the function (first ph-statement)?
you also could try to set up a wait(1); at the end of the function (if the function is not called within a while).

Dont know if it helps but I hope so

cheers


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