Giter Club home page Giter Club logo

Comments (5)

tomaka avatar tomaka commented on May 18, 2024

set_lin_acc_scale has an effect on gravity, but set_lin_acc still doesn't seem to have any effect.

If I call lin_acc I obtain the value that I have previously set, but no matter which value this has the object won't move.

from nphysics.

sebcrozet avatar sebcrozet commented on May 18, 2024

That's right, my previous patch did not intend to make set_lin_acc effectful, but to add set_lin_acc_scale as a workaround. A better solution that would make set_lin_acc really effectful is more complicated.

In the mean time, I reopen this issue because I realize that it is worked around but not fixed.
Do you have a use-case where something like set_lin_acc would do something that set_lin_acc_scale cannot?

from nphysics.

tomaka avatar tomaka commented on May 18, 2024

The idea is to do set_gravity(1.0, 1.0) and then manage all the accelerations manually using set_lin_acc_scale?
I didn't think of this, but it should work!

from nphysics.

sebcrozet avatar sebcrozet commented on May 18, 2024

Exactly! Though I know that this looks like a hack.

from nphysics.

sebcrozet avatar sebcrozet commented on May 18, 2024

Starting with v0.8.0, nphysics, set_lin_acc no longer exists. Force generators are not the way to go to customize, e.g., gravity (using force_generator::ConstrantAcceleration) in a per-object basis.

from nphysics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.