-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
destructible asteroid producing too many pieces #2
Comments
" The body definition gives you the chance to initialize the position of the body on creation. This has far better performance than creating the body at the world origin and then moving the body. Caution: Do not create a body at the origin and then move it. If you create several bodies at the origin, then performance will suffer. A body has two main points of interest. The first point is the body's origin. Fixtures and joints are attached relative to the body's origin. The second point of interest is the center of mass. The center of mass is determined from mass distribution of the attached shapes or is explicitly set with b2MassData. Much of Box2D's internal computations use the center of mass position. For example b2Body stores the linear velocity for the center of mass. When you are building the body definition, you may not know where the center of mass is located. Therefore you specify the position of the body's origin. You may also specify the body's angle in radians, which is not affected by the position of the center of mass. If you later change the mass properties of the body, then the center of mass may move on the body, but the origin position does not change and the attached shapes and joints do not move. see:
|
broken origin is also affecting drops location not being centered on asteroid. shifted origin visible with b2dddebug on EDIT: moved to it's own issue -> #30 |
didn't mean to close. |
[AsteroidShatterSystem] WARNING: polygonCentroid disagreement |
I must ensure all shapes I pass into box2d are legal and no vertices overlap. see: erincatto/box2d#735 for hints on valid hull shapes. |
its not my fault (this time!) it's in the triangulator: libgdx/libgdx#7487 |
|
sometimes extra shards are produced when shooting asteroids. duplicate vertices?
The text was updated successfully, but these errors were encountered: