Comments (7)
Hey @ianpurvis, sorry for the delayed response, I've been super busy lately - thanks for taking a look! I agree with Marco that I'd rather this not be configurable, although I can see why you thought that was my goal due to my comment about performance.
My concern was generating the geometry in the incorrect axes, then transforming to align with ThreeJS. Instead we want to construct the geometry in the correct axes according to ThreeJS alignment, then allow other transforms at runtime. There is also the option to use ConvexPolyhedron.
I'm closing #28 in favor of #30 and have released the updated Cylinder class in [email protected]
. I've also updated and released [email protected]
.
from cannon-es.
Hey @codynova , you may have a look at this issue Cylinder cannon.js vs cylinder three.js #58 #issuecomment-618207128.
It is a way to solve the problem, I've tested, it works very well.
from cannon-es.
@sunwin123 Thank you for taking a look. For performance reasons, rather than create the shape and then rotate, we should construct the geometry in the correct axes to start with.
from cannon-es.
@codynova Agree, if thereโs a way to create the geometry with correct rotations, it would be nice. But do they have such APIs ?
from cannon-es.
The geometry vertices and faces are mathematically generated here. I haven't looked into it enough yet, but there should be a straightforward way to alter that class to get the desired result during geometry generation.
from cannon-es.
I've read the code, it hasn't parameters to alter transformations in geometry creation periods.
from cannon-es.
@codynova @sunwin123 Hi guys. I gave this a try... what do you think of the approach in #28 ? Let me know if there is a better way to write the Typescript.
from cannon-es.
Related Issues (20)
- Chaining Hinges behaviour
- [ Question ] Spheres going through body with mass equal zero
- penetrate explosion
- The movement of a spinning ball in cannon js has an unexpected deviation that depends on the direction of the movement itself
- can anyone help me about using webpack to use it in one js file ?
- Documentation question: After getting the red box wireframe working, and want to get gray boxes bouncing...
- ConvexPolyhedron: Tetrahedron working vs. not working HOT 3
- DisableMotor() method does not work in HingeConstraint. HOT 1
- RaycastVehicle: We have twice call updateWheelTransformWorld in updateWheelTransform(from updateVehicle) and then in castRay
- How can I get a list of bodies touching the line between two vectors?
- getVelocityAtWorldPoint() requires result parameter, despite returning result HOT 1
- Documentation for vectorToWorldFrame() incorrect
- Unknown Force is applied on some vertically stacked cubes on straight plane? HOT 3
- What are indices parameters of CANNON.Trimesh function?
- I added a model, I don't know why there is no physical characteristics
- About the basic parameter units of RaycastVehicle in canon-es
- ConvexPolyhedron isn't working for certain vertices
- The sphere flies away after a few seconds while the tab is not active HOT 1
- Implementation of third person controller. How to prevent character from rotating when moving at an angle to an incline HOT 1
- Event `collide` is only thrown once when stacked objects enter trigger HOT 1
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 cannon-es.