Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (601)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
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 1230 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 ...

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.


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?


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.

Jesse (12 views)
2015-07-29 04:35:27

Riven (33 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (20 views)
2015-07-27 12:26:13

Riven (10 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (40 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (27 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 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‑
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!