Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
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  
  [odejava] addRelForceAtRelPos query  (Read 865 times)
0 Members and 1 Guest are viewing this topic.
Offline dsellars

Junior Member




Need to write more games


« Posted 2004-11-05 05:16:30 »

I think this may be more of a direct ode question rather than odejava, but some one around here may have experience with this.

I have a Body on which I am calling addRelForceAtRelPos(...)  I'm assuming thiat this is calling dBodyAddRelForceAtRelPos(...) native ode side.  I have a box and I am adding a force of (-5,0,0) at (0, boxlength/2, 0) I expected this to act like a lever and make the box spin around the z axis.

(I'm playing with the idea of the force being a directional thruster on the back of a hovercraft or one of those swamp boats with the big fan on the back, where the direction of the thrust stears as well as thrusts.  if it helps)

All goes well up to the point where one full revolution has compleated then the box reverses direction and spins the other way, at the same angular velocity (it's not slowing down then reversing direction).  I expectet relative position and diretion to stay the same no matter which direction it is facing.

Does any one know if this is whats supposed to be happening? Have I miss understood somthing?

I thought it may be how I was getting the direction (odeBody.getAxisAngle().angle) but when I just have a direct thrust applied to the cog and have the box bouncing off walls the direction seems to be drawn correctly.
I hope some one has some clues.

Cheers,
Dan.  
Offline dsellars

Junior Member




Need to write more games


« Reply #1 - Posted 2004-11-07 17:02:06 »

I worked out what was going on here.  As I was getting the axis angle when the angle reached 2PI the sign of the axis went negative, the angles I was getting back started appearing to move backwards.

I don't know if this is intended behaviour or not.

Dan.
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 (21 views)
2014-09-12 09:08:26

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

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

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

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

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

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

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

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

mitcheeb (37 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!