Code Monkey home page Code Monkey logo

jitterphysics2's People

Contributors

enkore avatar notgiven688 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jitterphysics2's Issues

Callback function when entity transform changes.

When the transform of an entity changes, is it possible to provide a callback function so that the transform of the corresponding entity in the game can be modified?

What I do now is: traverse every entity in the physical world every frame, find the corresponding game entity through Tag, and then modify the transform

Converting XNA Matrix to JMatrix for TransformedShape

It seems my rotated models are appearing different than the collision shapes in Jitter. Here is how I'm converting them:

public static JMatrix ToJMatrix(this Matrix matrix) { return new JMatrix( matrix.M11, matrix.M12, matrix.M13, matrix.M21, matrix.M22, matrix.M23, matrix.M31, matrix.M32, matrix.M33 ); }

Is this correct?

I'm then creating a transformedshape:

TransformedShape tfs1 = new(boxShape, center,rotationMatrix.ToJMatrix());

I hope the DebugDraw interface will be implemented soon.

I'm using JitterPhysics on my toy game engine, it is awesome.
When using rigidbody with shape and raycast, if I can see the position of rigidbody/shape or the path of raycast, you can troubleshoot errors more intuitively.
For rays, if the path can be seen, it can also be clear in what state (such as rotation) the shape is detected.

How do I create a kinematic body?

To use jitter2 on the server
I want to receive the character's movement from the client.
So, on the server, I want to handle the character's rigid body as kinematic. How can I do this?

IBroadPhaseFilter works the opposite of the way it should

Check out the docs for IBroadPhaseFilter:

https://github.com/notgiven688/jitterphysics2/blob/e80205d51c3947efaf926d38c121800302be6ceb/src/Jitter2/Collision/CollisionFilter/IBroadPhaseFilter.cs#L38C1-L38C90

It says <returns>False if the collision should be filtered out; true otherwise.</returns>.

However, when setting a filter, if I return true it doesn't do collision, but if I return false, the objects do collide.

IMO the correct behavior is according to docs, ie true = collide, false = don't collide.
It makes more sense that way. But whatever you choose please make it consistent with the comment.

Thanks!

Rigid Body damping is reversed

Hello,

Aside for this issue #53 , the damping values themselves are also seems to be reversed.

This means that damping value of 0 completely stop the objects from moving (what should happen with damping value of 1) while damping value of 1 actually let the objects move forever (what should happen with 0).

In other words, I need to set damping like this in order for it to behave like in other physics simulators:

rigidBody.Damping = (1f - actualLinearDamping, 1f - actualAngularDamping);

Is that intentional? I checked with few other engines and there seems to be a consensus that 0 = no damping, 1 = 100% damping, and sometimes negative value increase movement.

Thanks!

Unity & NetStandard support?

I really want to use this in Unity but targeting at .Net 7 with C# > 7 makes it impossible. Jitter physics v1 works perfectly, is there any way you could make it compatible too?

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.