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  
  resetRotationAndForces  (Read 1040 times)
0 Members and 1 Guest are viewing this topic.
Offline shovemedia

Senior Newbie





« Posted 2004-07-15 18:59:39 »

resetRotationAndForces mostly never works.

setting a body to a known position, orientation, etc ought to be pretty elementary operation. Why does the simulation blow up half the time? workarounds?

my car sim allows the car to flip over, so i'm implementing a reset button ...

:j
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #1 - Posted 2004-07-15 21:39:57 »

the car demo manages this without everything blowing up - are you calling resetRotationAndForces after moving them into position?  Just make sure the order you are calling things is correct (use the car demo as a reference).

This is probably a good question for the ODE mailing list if you still have troubles as they are the ODE experts and they would be able to answer this question for sure.  Just don't tell them java methods - open the source and see what ODE methods are actually being called and tell them those.  I would like to add a debug log option which basically logs all calls to ODE.

Will.

Offline shovemedia

Senior Newbie





« Reply #2 - Posted 2004-07-16 13:18:44 »

the car demo basically destroys all the joints
and rebuilds the car from scratch. I see why this
is effective now. Moving the chassis and expecting
the wheels to snap into place probably creates
crazy momentums and accelerations. I wonder
if I can get away with moving the wheels but leaving
the joints alone ...

I don't supppose Ode has a notion of "body groups"
which would allow multiple arbitrary bodies to be
positioned and rotated as a group?

thanks,  :j
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #3 - Posted 2004-07-16 21:38:22 »

not sure I follow your "body groups" suggestion, can you elaborate please?

Will.

Offline shovemedia

Senior Newbie





« Reply #4 - Posted 2004-07-20 12:53:27 »

"body groups" would be a collection of bodies joined by joints. My guess above proved correct, i needed to move both the chassis *and* the four wheels.
Offline Vikstar

Senior Newbie





« Reply #5 - Posted 2004-08-20 23:33:31 »

Another approach you could use instead of reseting the car, is to analyse its position and orientation and apply forces to "float" it back to the reset position and orientation (obviously must step the world during this). Probably easier to turn off gravity and most collisions as well. I guess you could think of it like a more complex kind of ERP.
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 (28 views)
2014-09-12 09:08:26

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

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

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

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

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

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

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

Longarmx (34 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!