Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
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]Jointstops are not working ?  (Read 1652 times)
0 Members and 1 Guest are viewing this topic.
Offline NewbTon

Junior Member




Odejava games rock!


« Posted 2005-03-06 17:10:37 »

I'm trying to attach a JointAMotor to a jointball. Problem is,  histop/lostop doesnt work it appears (im prop doing it wrong)..
I can start the motor but the joints never stops to rotate. Heres the code. Any suggestions ?


JointBall j = new JointBall(name,world);
JointAMotor m = new JointAMotor("m:"+name,world);
      m.setNumAxes(3);
      m.setAxis(0,0,1,0,0);
      m.setAxis(1,0,0,1,0);
      m.setAxis(2,0,0,0,1);
      m.setAngle(0,0);
      m.setAngle(1,0);
      m.setAngle(2,0);
      float a = 0.1f;
      //stop angles
      m.setParam(org.odejava.ode.OdeConstants.dParamHiStop,a);
      m.setParam(org.odejava.ode.OdeConstants.dParamLoStop,-a);
      m.setParam(org.odejava.ode.OdeConstants.dParamHiStop2,a);
      m.setParam(org.odejava.ode.OdeConstants.dParamLoStop2,-a);
      m.setParam(org.odejava.ode.OdeConstants.dParamHiStop3,a);
      m.setParam(org.odejava.ode.OdeConstants.dParamLoStop3,-a);
      //forces,vel
      float v = 0.1;
      float f = 0.1f;
      m.setParam(org.odejava.ode.OdeConstants.dParamVel,v);
      m.setParam(org.odejava.ode.OdeConstants.dParamVel2,v);
      m.setParam(org.odejava.ode.OdeConstants.dParamVel3,v);
      m.setParam(org.odejava.ode.OdeConstants.dParamFMax,f);
      m.setParam(org.odejava.ode.OdeConstants.dParamFMax2,f);
      m.setParam(org.odejava.ode.OdeConstants.dParamFMax3,f);
      m.attach(j.getBody1(),j.getBody2());
Offline NewbTon

Junior Member




Odejava games rock!


« Reply #1 - Posted 2005-03-06 23:38:47 »

Just found out, it' doesnt matter if I give them a force of 1 or one million, there wont be more "force" in the joints anyway.
I'm making a ragdoll which joints are controlled by A motors.
He can stand with a gravity of 0.0001, but crumples on 0.001 because of to little power in the joints.
Im using setParamter(dParamFMax,1000000). he should be superstrong ! Any ideas ?

Thanks, Newbton
Offline darkprophet

Senior Member




Go Go Gadget Arms


« Reply #2 - Posted 2005-03-07 13:31:13 »

Ball joints dont have a Max and a Min stop...

Use UniversalJoint instead..

DP

Friends don't let friends make MMORPGs.

Blog | Volatile-Engine
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline NewbTon

Junior Member




Odejava games rock!


« Reply #3 - Posted 2005-03-07 15:43:51 »

do you have an explanation to the missing power in the jointamotors ? Anyway I'm able to fine-control the jointball  (along 3 axises ) using motors. Isnt it somehow not logical that I can't set stops along the axises ? (on the motor, not the  ball joints which, as I can see, are not even aware they have axises).
Offline NewbTon

Junior Member




Odejava games rock!


« Reply #4 - Posted 2005-03-07 17:55:10 »

This is take from the ODE docs.  It says it's possible to set stops  on ballijoint if you use motors.

http://ode.org/ode-latest-userguide.html#sec_7_3_8

"An angular motor (AMotor) allows the relative angular velocities of two bodies to be controlled. The angular velocity can be controlled on up to three axes, allowing torque motors and stops to be set for rotation about those axes (see the ``Stops and motor parameters'' section below). This is mainly useful in conjunction will ball joints (which do not constrain the angular degrees of freedom at all), but it can be used in any situation where angular control is needed. To use an AMotor with a ball joint, simply attach it to the same two bodies that the ball joint is attached to."
Offline holodri

Senior Newbie




Java games rock!


« Reply #5 - Posted 2005-03-08 10:45:24 »

i tested balljoints and angular motor a few days ago with the odeed editor (odeed.org) and didnt get the desired effects.
the hi and lo-stops affected the speed.
maybe u cant set those stops at all or i didnt set the axis properly.
Offline NewbTon

Junior Member




Odejava games rock!


« Reply #6 - Posted 2005-03-08 11:23:05 »

Quote
i tested balljoints and angular motor a few days ago with the odeed editor (odeed.org) and didnt get the desired effects.
the hi and lo-stops affected the speed.
maybe u cant set those stops at all or i didnt set the axis properly.


I've got it to work now. Only God knows how. I played around with ERP , CFM , world step and a whole lot of other things. Suddenly it worked. Still I get alot of errors when I apply forces to the motors. It starts with error messages then my guy starts to act funny, sometimes he explodes with the joints and bodies flying in all directions.
Offline Vikstar

Senior Newbie





« Reply #7 - Posted 2005-03-19 04:49:44 »

Quote
I'm making a ragdoll which joints are controlled by A motors.

Have you thought about using three hinge joints in place of one ball joint?
If you do use three hinge joints (in serial), you may have to create a small gap between each joint.

EDIT: Probably best to use a universal joint attached to the torso, and a hinge joint which gives rotation about the primary axis of the limb, attached to the limb.
Offline NewbTon

Junior Member




Odejava games rock!


« Reply #8 - Posted 2005-03-20 02:09:42 »

Quote

Have you thought about using three hinge joints in place of one ball joint?
If you do use three hinge joints (in serial), you may have to create a small gap between each joint.

EDIT: Probably best to use a universal joint attached to the torso, and a hinge joint which gives rotation about the primary axis of the limb, attached to the limb.


Hard to control and not very entuitive. I prefer one joint per human joint. But the balljoints with motors are working now. Dont know how I did it though
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.

xsi3rr4x (31 views)
2014-04-15 18:08:23

BurntPizza (28 views)
2014-04-15 03:46:01

UprightPath (43 views)
2014-04-14 17:39:50

UprightPath (26 views)
2014-04-14 17:35:47

Porlus (43 views)
2014-04-14 15:48:38

tom_mai78101 (64 views)
2014-04-10 04:04:31

BurntPizza (124 views)
2014-04-08 23:06:04

tom_mai78101 (224 views)
2014-04-05 13:34:39

trollwarrior1 (190 views)
2014-04-04 12:06:45

CJLetsGame (198 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!