Comments (7)
Be careful when fixing this: you may inadvertently break levels.
from tbe.
- BowlingPin: This one is very weird, it's actually 2 polygons o_O
from tbe.
- CardboardBox: I think the polygon is too small for Box2D
from tbe.
First of all, keep in mind that all polygons have to be convex. That already makes a single form for a bowling pin impossible. I believe you can assign a mass per polygon,but e.g. Cactus doesn't do that.
You're correct: in order to make physics calculations doable, objects need a certain thickness, otherwise, a small object may move through without the algorithms detecting a collision.
This is why a wedge has 4 points. You may be right about the cardboard box.
BowlingPin: the polygons are defined such that the behavior of the pin matches reality. The top had to be of different size and different density.
Cola Bottle: the bottle it is modeled after is not a very stable bottle anyway. But make sure that you keep a draft on the edge - otherwise it may get stuck behind an invisible edge.
Hammer: original model was meant to be a temporary placeholder. Apparently I never fixed it.
from tbe.
Ugh, the wedge thing really annoys me. Box2D really doesn't let us have a freaking simple triangle? Wow, that's a huge disappointment. :-( Maybe the documentation should be checked out to see if Box2D is really that limited.
Ah, ok the bowling pin makes sense. But the polygons should at least not have that weird gap.
from tbe.
New CardboardBox polygons:
(-0.40,-0.4)=(-0.33,-0.4)=(-0.33,0.40)=(-0.40,0.40);(0.33,-0.4)=(0.4,-0.4)=(0.4,0.40)=(0.33,0.40);(-0.33,-0.4)=(-0.33,-0.33)=(0.33,-0.33)=(0.33,-0.4)
(hopefully this is large enough)
New Hammer polygons:
(-0.5,-0.5)=(-0.3,-0.5)=(-0.3,0.5)=(-0.5,0.5);(-0.3,-0.16667)=(0.5,-0.16667)=(0.5,0.16667)=(-0.3,0.166667);
I wasn't able to fix RotatingBar
. If I try to increate the outer bounds of the polygons, it stays the same.
E.g. (-.5,0.05)=(-.5,-0.05)=(.5,-0.05)=(.5,0.05)
gives the exact same result as (-.1,0.05)=(-.1,-0.05)=(.1,-0.05)=(.1,0.05)
. Apparently the whole polygon is taken and forcefully stretched to the whole object bounding box. :-(
I think RotatingBar should be fixed differently. Turn it into a RectObject like BirchBar and use the normal BirchBar texture and just render the peg/pivot point separately (with a slightly higher ZValue). This would also fix annoying stretching issues.
from tbe.
I have read the Box2D manual and there's no indication that simple triangles are disallowed. In fact, there's even an example of a triangle in the manual https://github.com/erincatto/box2d/blob/ecatto/manual/docs/manual.md, so I guess wedges actually can be perfect triangles, so there's no need for that weird 4th point. I can also confirm this in testing.
from tbe.
Related Issues (20)
- No hints HOT 1
- Object cannot be moved back to toolbox HOT 1
- No enough space for buttons HOT 3
- Hints are outside scene HOT 1
- Phone number cannot be selected HOT 1
- Switch back on stable old-ui branch HOT 30
- Incorrect scale of some object images HOT 4
- Old UI cleanup HOT 3
- [Discussion] Requirements for UI rework
- Level difficulty ratings HOT 2
- Add <hints> to all levels HOT 2
- Remove install instructions from wiki HOT 2
- Redo ugly stick figures HOT 2
- Move sorting-4 to attic
- Remove skipped levels HOT 2
- Simulation is not deterministic if many explosions
- Simplify level licensing / replace “Public Domain” with all-permissive license HOT 2
- Linking error: QTest HOT 1
- Level 47 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 tbe.