0 registered members (),
744
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
ball physics
#15954
08/03/03 00:12
08/03/03 00:12
|
Joined: Sep 2001
Posts: 237 Maine, USA
Jason Bryant
OP
Member
|
OP
Member
Joined: Sep 2001
Posts: 237
Maine, USA
|
This is a small ball rolling project that I have been working on. Arrow keys: move the ball mouse move: moves camera left mouse button: jump right mouse button: fly game issues: 1. Occasional collision problems. These have been greatly reduced since adjusting my gravity to more earthlike conditions. However, if you apply force on the ball somewhat perpendicular to a wall, the ball will spin through the level. 2. Odd bounce sometimes upon landing. Sometimes the ball will land and you will spin to the side instead of continuing in the same direction. Thanks to ventilator for the skybox. link: http://home.maine.rr.com/twomansoftware/rollyourown.zipJason - please let me know of any problems or suggestions. Thanks.
|
|
|
Re: ball physics
#15957
08/03/03 01:25
08/03/03 01:25
|
Joined: Mar 2003
Posts: 5,377 USofA
fastlane69
Senior Expert
|
Senior Expert
Joined: Mar 2003
Posts: 5,377
USofA
|
Dude, not to burst your bubble, but most anyone who visits this forum (physics scripting) can do what you did.
You're not presenting a new technique, nor asking a question, nor posting some insght onto the physics engine.
You say that this will demonstrate the problems with the physics engines yet you pose no new questions, no new bugs, and no new issues.
Everything you mentioned is a well known issue.
So Again, while you're intent may not be to showcase your project, by my understanding of the forums (and I could be 180 degrees wrong on this), this belongs in showcase not here.
|
|
|
Re: ball physics
#15959
08/03/03 02:31
08/03/03 02:31
|
Joined: Mar 2003
Posts: 5,377 USofA
fastlane69
Senior Expert
|
Senior Expert
Joined: Mar 2003
Posts: 5,377
USofA
|
As to your issues, look at you're own past post about objects sinking "Methods for reducing collision problems?" and spinning "unknown spinning". Like I said, you ain't said nothing new, not even to yourself! My first impression of you post was that you were showing off your current physics project and you were simply listing the issues that came with it. Near as I can tell, these aren't questions. Questions usually end with a ? or require a reply, thing neither of you points asked. You're points weren't phrased in the form of a question, you asked nothing specific about these points, and merely ask us to " please let me know of any problems or suggestions. Thanks. " Sounded to me like someone showing off his work rather than a person with specific question. I wasn't aware that your post was merely summarizing the ideas of two of your previous posts. Sorry for the misunderstand, but be more specific in the future. Just some advice, nothing more, nothing less. Peace out.
|
|
|
Re: ball physics
#15961
08/03/03 05:46
08/03/03 05:46
|
Joined: May 2002
Posts: 7,441
ventilator
Senior Expert
|
Senior Expert
Joined: May 2002
Posts: 7,441
|
looks like marble madness! i also thought about doing a project like this because it could be done very nicely with the physics engine... do you apply a force or torque to the ball? did you try to make the level geometry thicker? code:
| | block2 *| --------++-------- | block1 | |
for example block1 should be very thick and block2 should be expanded further down.
* is the ball
... i noticed the second problem in my experiments too, but it didn't bother me much because if the ground has a grass texture for example, it could be a little stone or something which causes the change of direction!
|
|
|
Re: ball physics
#15962
08/03/03 08:04
08/03/03 08:04
|
Joined: Sep 2001
Posts: 237 Maine, USA
Jason Bryant
OP
Member
|
OP
Member
Joined: Sep 2001
Posts: 237
Maine, USA
|
This is the player input: code:
// reset the force vector each frame force.x = 0; force.y = 0; force.z = 0;
//allow control of ball if on the ground... if (ground_dist > 0 && ground_dist < scale_dist) { if(key_cuu) { vec_set(temp.x,camera.x); temp.z = player.z; vec_diff(force.x,player.x,temp.x); vec_normalize(force,power); //force vector points from camera to player at length of power } if (key_cud) { vec_set(temp.x,camera.x); temp.z = player.z; vec_diff(force.x,player.x,temp.x); vec_inverse(force); vec_normalize(force,power); } if(key_cul) { vec_set(temp.x,camera.x); temp.z = player.z; vec_diff(force.x,player.x,temp.x); force_ang.pan = 90; vec_rotate(force,force_ang); vec_normalize(force,power); } if(key_cur) { vec_set(temp.x,camera.x); temp.z = player.z; vec_diff(force.x,player.x,temp.x); force_ang.pan = -90; vec_rotate(force,force_ang); vec_normalize(force,power); } }
and the movement code is:
code:
function movePlayer() {
//increase gravity force if not in a jump... if (jumping == 0) { force.z -=10000; }
// apply force to player phent_addcentralforce(player,force); }
I have tried with thick blocks, but haven't had better success with them. Since adjusting the gravity, as I've mentioned before.. the ball going through the blocks is more trivial than it used to be.
I'm not sure how to approach the spinning problem. I would like the ball to continue in an easily forseeable way though. Any ideas as to prevent the odd spin reaction?
thanks, Jason
edit- I did try using torque at one point to see how well that would work. It didn't work as well as using force. It seemed to pull to the right actually. Marble madness was great!
|
|
|
|