Code Monkey home page Code Monkey logo

Comments (5)

ricardojmendez avatar ricardojmendez commented on May 22, 2024 1

Hi,

There's no easy answer, since how physics are used and forced interpreted will likely depend on your game. I have myself used them more in games where the steering is not physics-based.

If you see function ApplySteeringForce in TickedVehicle, you'll notice that if the attached Rigidbody is not kinematic, then the vehicle will apply the force using Rigidbody.MovePosition. If this isn't enough for your case, then you may want to modify TickedVehicle (or create a subclass, although that function is currently not overridable) so that it interprets and applies the calculated forces in a game-specific manner.

Let me know if that helps. Cheers!

from unitysteer.

TCMOREIRA avatar TCMOREIRA commented on May 22, 2024

I'm currently writing some other feature;
However - I'll try to Modify TickedVehicle as soon as I get the chance!
Thank you!

Then, I'll let you know what happened! =]

from unitysteer.

abdulazizali77 avatar abdulazizali77 commented on May 22, 2024

Hi @ricardojmendez
Thank you so much for UnitySteer
Weve been trying out UnitySteer withh RBD2d dynamic and have been having similar issues (maybe) as @TCMOREIRA

Found a quick fix for it by changing the queue code from Update to FixedUpdate

ref: https://unity3d.com/learn/tutorials/modules/beginner/scripting/update-and-fixedupdate

Still playing around with it, not completely sure of the ramifications of the changes, probably need to make it configurable in the next UnitySteer release?

from unitysteer.

ricardojmendez avatar ricardojmendez commented on May 22, 2024

Hi,

I'm not actively developing UnitySteer right now, as I'm not doing anything in Unity. Feel free to send a PR with your rationale and I'll review it when I get a breather. Cheers!

from unitysteer.

spikything avatar spikything commented on May 22, 2024

Combining RigiBody physics with steering behaviours used to work for me, but not since the last 2 major Unity releases. The Update / FixedUpdate trick didn't work for me, so I added the ability to blend steering forces with non-kinematic RigidBody forces, rather than simply moving the object. Since I haven't battle tested this in my game yet, I'm not creating a pull request yet - but you can see the tiny change here: spikything@6172185

from unitysteer.

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.