Results 1 to 9 of 9

Thread: Converting From ODE to Newton

  1. #1

    Converting From ODE to Newton

    Hi

    I am converting a project from ODE to newton and I am having some trouble with a few functions.

    ODe has a function

    [pascal]dBodyAddRelForceAtRelPos[/pascal]

    Which applys a force at a relative position in the objects local space. I use this function to simulate a thruster firing on the space ship at a certain point on the space craft.

    Now newton does not seem to have a similar function. Any ideas on how I write a version of this function myself :?:

    I know I have to use the [pascal]NewtonBodyAddForce[/pascal] in the ForceAndTorqueCallback but this appears to only support adding a force, or torque at the center of the body.

    What I am trying to simulate is fairly accurate physics on a space ship. each thruster will apply it's force in a certain direction at a certain point on the body, th idea being that is a thruster gets damaged the control of the craft will alter.

    can anyone help?
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  2. #2

    Converting From ODE to Newton

    You could search a little better, i asked same question on newton forum a while back

    http://newtondynamics.com/forum/viewtopic.php?t=2976
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  3. #3

    Converting From ODE to Newton

    I have seen that post already, I was just wondering if there was a better way. ODE seemed to handle much of this kind of stuff for you (or provide an API for it) it appears that with newton you have to do allot of the leg work yourself, not that I mind doing the leg work, but I hadn't banked on having to do it.

    You might say, stick with ODE then, and I would but it does not support the platforms I want to deploy on :cry: and it hasn't been updated for ages.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  4. #4

    Converting From ODE to Newton

    if newton would that for you the code would be probably the same..

    maybe you need newtonbodyaddimpulse?
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  5. #5

    Converting From ODE to Newton

    Quote Originally Posted by Delfi
    newtonbodyaddimpulse?
    an impulse is not the same as a force, do not use this as a replacement.

    if you dont like the newton api then mabey the best thing is to stay with ode, but i prefer julio (the newton dev) to focus his work on the core features instead of adding helper functions

  6. #6

    Converting From ODE to Newton

    Maybe what is required is a 3rd Party wrapper that wraps both ODE and Newton APIs into a more standard set of method calls. Then during the class creation you can just pass an enumeration type that defines which Physics library you prefer to use. That way your app/game only talks to wrapper, and underneath does the appropriate calls. Almost like an SDL for Physics libraries .
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  7. #7

    Converting From ODE to Newton

    Quote Originally Posted by savage
    Maybe what is required is a 3rd Party wrapper that wraps both ODE and Newton APIs into a more standard set of method calls. Then during the class creation you can just pass an enumeration type that defines which Physics library you prefer to use. That way your app/game only talks to wrapper, and underneath does the appropriate calls. Almost like an SDL for Physics libraries .
    if it has a raycast car in it, it is the winner
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  8. #8

    Converting From ODE to Newton

    Quote Originally Posted by tux
    an impulse is not the same as a force, do not use this as a replacement.
    Ok, thanks for the tip



    Quote Originally Posted by tux
    if you dont like the newton api then mabey the best thing is to stay with ode, but i prefer julio (the newton dev) to focus his work on the core features instead of adding helper functions
    I do like the newton API, it's very clean and I like the interface. I also agree that julio should keep focusing on the core, it would be nice like Dom said to have a unit which wraps all of the helper functions up to save time.

    I think see a newtonhelper.pas in my future.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  9. #9

    Converting From ODE to Newton

    I've made a few helper functions, take a look at RagePhysics at https://sourceforge.net/projects/rage-engine/ (the cvs is way more up to date then the file release).

    I've got most of December off work, so hopefully i can get back to adding things to it

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •