Comments (7)
Thank's yes terrain this would be the top.
Saharan think of it for next release of OimoPhysics.
For the moment no triangle shape but is possible for sure.
I try to add this but if someone finds an idea I take
from oimo.js.
Hi, that's great that Saharan wants to add it. I just might put an issue on his original repo and maybe I can help get the process started.
As for doing it on your own, there are numerous ray-triangle intersection tests out there (Three.js already has one in place). I'm pretty sure we could get a sphere to work, using the sphere's old center position as one end of a line segment and it's current position as the other end of the line segment. But the box is more difficult because of numerous edges and possible orientations. I don't really know how to do that.
A good place to look for ideas on terrain shape is here: https://github.com/bartdeboer/JigLibJS2/blob/master/geometry/JTerrain.js
and here for sphere-terrain collision code:
https://github.com/bartdeboer/JigLibJS2/blob/master/collision/CollDetectSphereTerrain.js
and box-terrain code:
https://github.com/bartdeboer/JigLibJS2/blob/master/collision/CollDetectBoxTerrain.js
EDIT: just found this triangle class: might be helpful
https://github.com/bartdeboer/JigLibJS2/blob/master/geometry/JTriangle.js
JigLibJS2 is also a good physics library, but unfortunately it is not in active development, both original and ports. There are some bugs in this engine I think but I don't know how to fix them.
Anyway, thanks for the info. I will contact Saharan and see what's happening with his terrain implementation. I have starred your repo and I look forward to what's coming next with Oimo!
Thanks!
from oimo.js.
hum i think test sphere terrain for the moment
oimo can manage 1000 dynamique sphere i hop more when fixed
also add particule can be cool
from oimo.js.
sphere terrain demo added :)
from oimo.js.
@lo-th ,
Thank you so much for implementing this! It works great across all of my very different devices - old Windows XP desktop, 'newer' Windows 7 laptop, and even my Samsung Galaxy smartphone!
How did you end up implementing this? How does the internal terrain collision algorithm work? Are you using object (falling boxes' or balls')ray-triangle intersect test for each triangle of the terrain, or falling object's bounding sphere/ bounding box vs. terrain bounding sphere for each triangle of the terrain?
Regardless, this is a great addition to the already awesome Oimo engine - Thanks again! :)
from oimo.js.
thank's, i use sphere collision, each vertex of terrain mesh have one sphere. box take many more calculation. is limited 64*64 sphere is good. Triangle can be the best option but i have to make some research about.
from oimo.js.
@lo-th Hello, I've looked at your sphere terrain demo, but i didn't understand the concept...
Could you make a wiki page, or add some useful comments in tour code?
I've made the same thing, but without physics (here) and i would like to add physics to it.
Could you please help me (just give me a few explainations if you don't have much timeπ) and give me a sort of "example code" ?
Excuse me, this issue is very oldπ...
Thanks...
from oimo.js.
Related Issues (20)
- Perpetuum mobile)
- TypeScript declarations HOT 3
- RigidBody_X? HOT 1
- d.ts file build failed
- support torus for oimo HOT 2
- Body names are duplicated. HOT 1
- Is it possible to move a Rigidbody without using force? HOT 1
- Want the update example about magnetic force
- How to move a ridgidbody without them bumping up over eachother HOT 1
- Exporting a mesh into a 3D file?
- Contact detection bugs with kinematic bodies
- Importing an .stl file in as a rigidbody.
- How to visualize a physic object in the scene?
- Impossible to "lock" a body after ?
- Wrong Ineria of Cylinder about Y axis
- Contact callback HOT 2
- Differences between joint constraints.
- Documentation? HOT 3
- Importing convex mesh types to a world
- What design pattern is used by oimo.js? ECS mode? Component mode?
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 oimo.js.