Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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  
  [Odejava] Static And Dynamic Joints  (Read 1256 times)
0 Members and 1 Guest are viewing this topic.
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Posted 2005-02-19 21:17:58 »

Hi,
Is there a way to link a dynamic object via say a JointHinge to a static object.

This is helpful for things like doors, The door is attached to the wall, but the wall is static (not affected by forces and gravity).

Ive looked at the code for Joint which leads back to OdeJNI and OdeJNI.get_BODYID_ZERO

Does BODYID_ZERO indicate that this is attached with the world?

Thanks, DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline holodri

Senior Newbie




Java games rock!


« Reply #1 - Posted 2005-03-01 21:44:28 »

hi,
did someone already solve it ?, i'd be very curious.
my actual workaround is kind of a heavy stone i attached my moving bodies to and i'm not satisfied with it  Cheesy

i already tried to create the joints with lowlevel api and connect to body_id_zero but the result was an ode-crash....

i know things happen due to my inferior programming knowledge. therefore my hope is still alive Wink

Offline William Denniss

JGO Coder


Projects: 2


Fire at will


« Reply #2 - Posted 2005-03-02 05:32:14 »

I don't think BODYID_ZERO should be used for this, as I think that is the logical equivilent of 'null'.

I would have suggested attaching it to a very heavy Body.  Beyond that I'm not sure.  Have you tried the ODE mailing list?  They are pretty good with things like this.

Will.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline holodri

Senior Newbie




Java games rock!


« Reply #3 - Posted 2005-03-05 09:46:44 »

are u sure ?
the ode userguide says:

"To attach this joint to only one body, set body1 or body2 to zero - a zero body refers to the static environment."

hmm..but the next sentence in the userguide is:
"Some joints, like hinge-2 need to be attached to two bodies to work."

i'm not so sure anymore ... it's quite possible i tried that with hinge2.
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #4 - Posted 2005-03-05 10:33:23 »

yes, hinge2 needs two bodies to work...

Try Ball or Hinge to see...I haven't had a chance yet, too busy doing a demo for GDC! I'l sit down with it soon...

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Offline holodri

Senior Newbie




Java games rock!


« Reply #5 - Posted 2005-03-06 17:33:27 »

ok.. i replaced the hinge2 with universal and attached them sucessfully to the static environment.

joint.attach(null, body);

it is running now, but the universals act more like fixedjoints .. doesnt move anymore...  :-/ ?
Offline holodri

Senior Newbie




Java games rock!


« Reply #6 - Posted 2005-03-06 20:47:49 »

Lips Sealed
omg .. i just didnt realize that my inverted pendulums were just in balance as soon as they got connected to the world.  Cheesy

now everything works fine, thx for help.
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.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

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

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

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!