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
0 registered members (), 18,767 guests, and 5 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
foosball table game physics... #73450
05/07/06 13:48
05/07/06 13:48
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
Please i need some help.
How can i implement a real collision detection and physics system, between a player and the ball just like in a foosball table game?
I own the commercial edition, so i only use one physics object that is the ball, and for the player i use an mdl.
I move the player with c_move and for the tilt movement i use c_rotate, however, when the two entities collide, sometimes the ball go to places that i dont want, and the interaction between the two entities isnt real and playable.
thanks in advance.

Re: foosball table game physics... [Re: demiGod] #73451
05/08/06 16:45
05/08/06 16:45
Joined: Mar 2006
Posts: 35
Sao Paulo, Brazil
EdMercer Offline
Newbie
EdMercer  Offline
Newbie

Joined: Mar 2006
Posts: 35
Sao Paulo, Brazil
what is the collision shape you used for your ball ? is it poly or sphere or something else entirely ?

Re: foosball table game physics... [Re: EdMercer] #73452
05/08/06 17:52
05/08/06 17:52
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
I used SPHERE like this:
PHENT_SETTYPE(MY,PH_RIGID,PH_SPHERE);
PHENT_SETMASS(MY,1,PH_SPHERE);

Re: foosball table game physics... [Re: demiGod] #73453
05/08/06 19:26
05/08/06 19:26
Joined: Mar 2006
Posts: 35
Sao Paulo, Brazil
EdMercer Offline
Newbie
EdMercer  Offline
Newbie

Joined: Mar 2006
Posts: 35
Sao Paulo, Brazil
ph_sphere entities always have only one collision point when in contact with other objects so the "recoil" is always a single force. It should therefore have very predictible reactions. Have you tried different combinations of fat and narrow bounding boxes for the player entity ?

Re: foosball table game physics... [Re: EdMercer] #73454
05/08/06 20:04
05/08/06 20:04
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline OP
User
demiGod  Offline OP
User

Joined: Mar 2006
Posts: 752
Portugal
Hello EdMercer, thank you for your reply.

I´ve tried combinations between fat and narrow flags, but the problem persists. I have almost certain that i am doing something wrong but i dont know what it is.
Currently, i am not applying no force at all in the ball (like phent_addcentralforce), just pushing and carrying the ball with the player movement and rotation (like in a foosball game) via c_move and c_rotate.
When i push the ball a little faster, sometimes the player seems to penetrate the ball and her trajectory is unstable.
In other hand, sometimes when the player collide frontal with the ball (applying a rotation), she passes through him.

i am using 3dgs 6.31.4 comm, with enable_polycollision = 1 (default)


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