|
6 registered members (vince, VHX, Grant, Geir, juergenwue, 1 invisible),
3,464
guests, and 32
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Sphere Physics Problem
#47199
06/04/05 02:55
06/04/05 02:55
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
OP
Expert
|
OP
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
Has anyone had problems with pushing a ball into a corner and it going through walls in the corner? EDIT: Nevermind, I figured it out, the sphere model must not be centered in MED vertically. If the bottom of the sphere is on the center mark it doesn't happen. EDIT2: Actually I didn't figure it out.  So the question still stands. Here is an example of what I am talking about. If you get the sphere forced into the corner it goes through WED walls. I am guessing it has to do with the sphere model, but I am not sure. It seems that anytime that a continuous force is applied by the player on the sphere phent object it will eventually go through the level geometry when it's trapped. Thanks for any help, Loco
Last edited by Locoweed; 06/04/05 04:13.
|
|
|
Re: Sphere Physics Problem
[Re: Locoweed]
#47200
06/04/05 06:27
06/04/05 06:27
|
Joined: Mar 2003
Posts: 5,377 USofA
fastlane69
Senior Expert
|
Senior Expert
Joined: Mar 2003
Posts: 5,377
USofA
|
Quote:
It seems that anytime that a continuous force is applied by the player on the sphere phent object it will eventually go through the level geometry when it's trapped.
Have you tried this with a cube phent object? Could be inherit to the system. If so we could tweak some physics parameters and try to minimize it.
|
|
|
Re: Sphere Physics Problem
[Re: Superjeu3D]
#47202
06/04/05 17:24
06/04/05 17:24
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
OP
Expert
|
OP
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
Hi, @ fastlane, No I don't seem to have these problems with cube phent objects. @ Superjeu3D, I did re-upload the file incase it was corrupt. I can minimize the problem to a degree. In the example I just uploaded again it is quite hard to make the ball go the level gemetry, but still possible if you get it trapped right. Here's the basic code that pertains to the phent sphere if you still can't unzip the file for some reason. In WED the phent sphere's skills set to Mass = 30, friction = 75, bounciness = 75, bounce min speed = 5, and no_polygon = on. These can of course be played around with from WED. Code:
// some entity skills and flags define group_id, skill2; define mass, skill3; define friction, skill4; define bounciness, skill5; define Bounce_Min_Speed, skill6; define NO_POLYGON,flag7;
var earthgravity[3] = 0,0, -250;
function Main() { ph_setgravity( earthgravity ); . }
// uses group_id // uses Mass // uses Friction // uses Bounciness // uses Bounce_Min_Speed // uses NO_POLYGON action PhentSphere { // set polygon collision on if flag says so if(my.NO_POLYGON == OFF) { my.polygon = on; } // if entity has a phent group ID set it if(my.GROUP_ID != 0) { phent_setgroup( my, my.GROUP_ID); }
my.dynamic = on; phent_settype(my, PH_RIGID, PH_SPHERE); // sets the object within the physics engine phent_setmass(my, my.mass, PH_SPHERE); phent_setfriction(my,my.friction); phent_setelasticity(my, my.bounciness, my.bounce_min_speed); phent_enable(my, ON); // enable the phent enitity }
I am also using c_move(), which shouldn't matter, but might. Let me know if you see anything wrong in the code. Thanks, Loco
Professional A8.30 Spoils of War - East Coast Games
|
|
|
Re: Sphere Physics Problem
[Re: fastlane69]
#47204
06/04/05 22:06
06/04/05 22:06
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
OP
Expert
|
OP
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
Thanks fastlane69,
I will play around with those settings and see what happens. It definately may solve the problem.
I was also thinking that since the example is running at around 200fps, that I might need to sychronize the physics fps with the actual fps somehow. It was a thought that popped into my head. I haven't looked into that yet.
Loco
Professional A8.30 Spoils of War - East Coast Games
|
|
|
Re: Sphere Physics Problem
[Re: fastlane69]
#47206
06/04/05 22:17
06/04/05 22:17
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
OP
Expert
|
OP
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
Hehe, Thanks for the help. It's going to be probably end up being a timing issue then. I didn't see some of these problems with larger projects, thus lower fps, so thats probably it. Thanks again for professing the obvious to the unprofessed (don't look that up in the dictionary)  . Loco
|
|
|
|