Skip to content
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

Physics api changes and Oimo fixes #761

Merged
merged 8 commits into from Oct 19, 2015
Merged

Physics api changes and Oimo fixes #761

merged 8 commits into from Oct 19, 2015

Conversation

RaananW
Copy link
Member

@RaananW RaananW commented Oct 18, 2015

Two new functions were added to the physics engine (for low-level manipulations):

  1. getWorldObject - will give the developer the low-level world object of the physics engine
  2. getPhysicsBodyOfMesh - will return the body object of the specific mesh (or null if none exists).

Oimo now uses Quaternion rotation only, and initialized rotations correctly. It is also partly restructured.

Small bug fix for Cannon.js plugin that will appear if the mesh's center of mass is not in the middle.

Scene's enable physics function - gravity is optional. It will be set to the default if the function will be executed with no parameters at all.

All tested with the Gravity scene from the samples.

The Scene's "enablePhysics" does not require the gravity, there is a
default value at the setGravity function of the physics engine.
Oimo plugin was restructured to use quaternion (no euler rotations of
the mesh will be used).
getWorldObject was added for low-level world manipulations (if needed by
the developer).
Oimo has a bug in its body class (which I doubt will ever be fixed).
Rotation cannot be used correctly while creating a compound object.
Setting the rotation afterwards works correctly.
For those who wish to execute low-level physics changes to the mesh's
physics body - the physics engine now exposes a function that will
return it.
@RaananW
Copy link
Member Author

RaananW commented Oct 19, 2015

Wait with merging, further changes coming.

making sure the bounding box is calculated correctly.
@RaananW
Copy link
Member Author

RaananW commented Oct 19, 2015

All should be fine now.

deltakosh added a commit that referenced this pull request Oct 19, 2015
Physics api changes and Oimo fixes
@deltakosh deltakosh merged commit d545f92 into BabylonJS:master Oct 19, 2015
@RaananW RaananW deleted the physics-api-changes branch October 20, 2015 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants