Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (495)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Bounciness of rigid body?  (Read 1625 times)
0 Members and 1 Guest are viewing this topic.
Offline erke_mng

Junior Newbie





« Posted 2007-05-03 07:26:56 »

Hello,

How to make a rigid body absolutely not bouncing?
Though I know little about programming and Java, I know almost nothing about physics.
I want the rigid body stop at the place where it collides with another body or geom.

Best regards,
Erke.
Offline t_larkworthy

Senior Member


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #1 - Posted 2007-05-03 07:28:33 »

What simulator are you using? Your own?

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline erke_mng

Junior Newbie





« Reply #2 - Posted 2007-05-03 07:49:27 »

OdeJava. Of course, I am using OdeJava.
I thought that this forum was for OdeJava.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline arne

Senior Member




money is the worst drug- we should not let it rule


« Reply #3 - Posted 2007-05-03 08:47:16 »

no, physics are supposed to be discussed here in general.

But Odejava is a very commonly used physics simulator, so there are many posts about odejava here.

But you can also find discussions about other physics simulators (e.g. JOODE) here, too.
JOODE btw. is a pure Java implementation of Ode, which Odejava uses.

:: JOODE :: Xith3d :: OdeJava ::
Offline t_larkworthy

Senior Member


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #4 - Posted 2007-05-03 12:05:30 »

Set the bounce of the surface parameters to zero. global CFM to nearly 0. ERP to a high value. that should stop most of it. However the way collision detection works is by detecting the collision after it happens by penetration depth. Setting ERP to 1 corrects this error in one timestep, by applying a velocity to the body. So as all collisions have an error, and all collisions are corrected via an error correction velocity, so you can never completely remove a bit of bounce.
If you absolutely need it totally stationary, then detect when the collision has occurred and set the velocity to zero manually afterwards. Note unless ERP =1 and CFM =0, there will still be a small after collision becuase the error is not removed in one timestep, but setting the ERP to 1 and CFM to zero can cause problems elsewhere so this is not recommended.

Tom

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline D.Telmen

Junior Newbie





« Reply #5 - Posted 2007-05-03 14:12:20 »

ERP to 1 and CFM to zero == what Function?  in ODEJava  Tongue
Offline t_larkworthy

Senior Member


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #6 - Posted 2007-05-03 14:24:04 »

World.setErrorReductionParameter(float erp)
World.setConstraintForceMix(float cfm)

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline D.Telmen

Junior Newbie





« Reply #7 - Posted 2007-05-03 14:33:58 »

tnx Roll Eyes
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (29 views)
2014-09-12 09:08:26

Norakomi (57 views)
2014-09-10 13:57:51

TehJavaDev (78 views)
2014-09-10 06:39:09

Tekkerue (38 views)
2014-09-09 02:24:56

mitcheeb (58 views)
2014-09-08 06:06:29

BurntPizza (45 views)
2014-09-07 01:13:42

Longarmx (30 views)
2014-09-07 01:12:14

Longarmx (35 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19

mitcheeb (40 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!