Comments (5)
Thank you so much, I figured out how to set the center of mass, I really appreciate your help. now I'm trying to figure out why the minecraft model doesn't visually match the physical model.
from libbulletjme.
The model does not want to accept setScale normally.
Applying setScale()
to a compound shape is tricky, because it's not obvious how scaling should affect the child shapes. If possible, generate the collision shape at physics-space scale to begin with.
The center of mass at the corner
The center of mass is at (0,0,0) in the shape's coordinate system. You choose where to position the child shapes relative to that center.
Have you read the tutorial page that discusses collision shapes? In particular, the section on shapes for dynamic bodies? If you're unsure how to calculate the center of mass, principal axes, and moments of inertia for your entity by hand, you may want to use the principalAxes()
and correctAxes()
methods mentioned in the tutorial page.
the model does not want to converge with the visual representation
The open-source Minie and SPORT projects provide debug visualization tools for solving these sorts of issues. Perhaps you can adapt them for your Minecraft environment.
from libbulletjme.
With SPORT I was able to fix the visualization of the model, and I still have one last question, how i can mirror (flip) the CompoundCollisionShape on one of the axes?
P.S ( I mean the rotation of the model itself, not the PhysicsBody )
from libbulletjme.
That looks like a rendering question, not a Libbulletjme question.
Mathematically, mirroring on, say, the X axis replaces (x, y, z) with (-x, y, z).
In the context of 3-D graphics, reflection might also require reversing the winding order of the polygons.
from libbulletjme.
That looks like a rendering question, not a Libbulletjme question. Mathematically, mirroring on, say, the X axis replaces (x, y, z) with (-x, y, z). In the context of 3-D graphics, reflection might also require reversing the winding order of the polygons.
I really appreciate your help, thank you, you answered all my questions
from libbulletjme.
Related Issues (20)
- Using "compile" in build.gradle HOT 2
- Question about min/max size when creating physics space HOT 14
- Latest versions does not exist in maven HOT 7
- test whether a point is inside a `CollisionShape`
- Why there are no natives in Maven? HOT 2
- expose more SolverInfo properties HOT 1
- Mac M1 support HOT 12
- Strange behaviour when combining CollisionListeners with .addToIgnoreList HOT 4
- PhysicsCharacter.onGround() is unreliable HOT 7
- Double-precision support for non-rigid body physics objects HOT 10
- java.lang.NoClassDefFoundError: com/simsilica/mathd/Matrix3d HOT 4
- SIGSEGV crash in `btRaycastVehicle::updateFriction()` HOT 15
- PhysicsRigidBody lots of excess logging HOT 2
- Please revise your math classes to not be final. (Compatibility with other Math APIs) HOT 15
- where is CollisionShapeFactory? HOT 3
- Create a method in MeshCollisionShape to get a triangle HOT 8
- how to push object? HOT 9
- [ Question ] - How does this library/engine handle spatial partitioning? HOT 6
- [Question] Which collision form should I use? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libbulletjme.