Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 1,012 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
collision problem after 6.40.5 update #80584
07/07/06 09:26
07/07/06 09:26
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
I had this code with version 6.31.4 comm for the ball and the physics was very good and realistic, including collision against models, maps and blocks (geometry).
Code:

PHENT_SETTYPE(MY,PH_RIGID,PH_sphere);
PHENT_SETMASS(MY,0.2,PH_SPHERE);
PHENT_SETFRICTION(MY,75);
PHENT_SETELASTICITY(MY,75,25);
PHENT_SETDAMPING(MY,50,75);
PH_SETGRAVITY(VECTOR(0,0,-386));


However, after the update 6.40.5, even recompiling the maps and the whole level, now the physics is very unstable, the friction and roation of the ball its not normal, seems to glide on the ground (blocks and sprites).
Sometimes the ball bounces against models, maps and blocks, and sometimes (almost all the time), the ball stays close to the model for some time, but rotating on the collision point.
It seems to have a delay on the collision response. Please, how can i solve this problem (diferent solution than downgrade the engine)?

Re: collision problem after 6.40.5 update [Re: demiGod] #80585
07/16/06 16:03
07/16/06 16:03
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Maybe try something like setting this for your ball;

Code:
ph_setcontacts(vector(80000, 0,0), 0,0,0);



It helped me getting rid of some weird behavior,

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: collision problem after 6.40.5 update [Re: PHeMoX] #80586
07/16/06 18:00
07/16/06 18:00
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline
Expert
Helghast  Offline
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Quote:

Maybe try something like setting this for your ball;

ph_setcontacts(vector(80000, 0,0), 0,0,0);

It helped me getting rid of some weird behavior,

Cheers




hey Phemox, i didnt know about that code... looks very usefull though. might consider upgrading if that works with my weird car behaviour as well...

thanks for the snippet

regards,


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: collision problem after 6.40.5 update [Re: Helghast] #80587
07/16/06 23:15
07/16/06 23:15
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
I already had tried so many combinations with ph_setcontacts and ph_setcorrections, i cant make it work in 6.40.5 version.
Unfortanly i have to downgrade to 6.31.4 version

Re: collision problem after 6.40.5 update [Re: demiGod] #80588
07/17/06 05:48
07/17/06 05:48
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Programming a ball does not require adjustments with ph_setcontacts. The default settings will do. The programming section of the 6.40 manual contains a small physics ball example - you can just use it as a template.

Re: collision problem after 6.40.5 update [Re: jcl] #80589
07/17/06 22:19
07/17/06 22:19
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Could these problems be framerate related jcl?

By the way is it better to set my.polygon = on; or doesn't this have any influence?

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: collision problem after 6.40.5 update [Re: PHeMoX] #80590
07/18/06 15:07
07/18/06 15:07
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Yes, adding a force instead of a velocity, and using too small objects will indeed produce frame rate dependent behavior of physics. The fps_max problem mentioned by Ullillilia could also have played a role.

my.polygon has no influence on physics, it's for c_trace and c_move only.

Re: collision problem after 6.40.5 update [Re: jcl] #80591
07/18/06 22:05
07/18/06 22:05
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Thanks for the answers, okey then I will remove my.polygon again heheheh,

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: collision problem after 6.40.5 update [Re: jcl] #80592
07/20/06 10:52
07/20/06 10:52
Joined: Sep 2005
Posts: 274
Switzerland - Zurich
zwecklos Offline
Member
zwecklos  Offline
Member

Joined: Sep 2005
Posts: 274
Switzerland - Zurich
Quote:


my.polygon has no influence on physics, it's for c_trace and c_move only.




I have a sphere (physic-object with phent_settype(my, ph_rigid, ph_sphere) moving over a floor (mdl with my.polygon = on) this works fine in 6.31.
Will this still work in 6.40?

sorry im a bit confused

cheers

Zwecklos


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