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 8 commits into from Oct 19, 2015


Copy link

@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.

RaananW added 6 commits Oct 18, 2015
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.
Copy link
Member Author

RaananW commented Oct 19, 2015

Wait with merging, further changes coming.

RaananW added 2 commits Oct 19, 2015
making sure the bounding box is calculated correctly.
Copy link
Member Author

RaananW commented Oct 19, 2015

All should be fine now.

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

Successfully merging this pull request may close these issues.

None yet

2 participants