Physics api changes and Oimo fixes #761

Merged
merged 8 commits into from Oct 19, 2015

Conversation

Projects
None yet
2 participants
@RaananW
Member

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 some commits Oct 18, 2015

Gravity is optional
The Scene's "enablePhysics" does not require the gravity, there is a
default value at the setGravity function of the physics engine.
Oimo restructure and getWorldObject
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 Compound bug fix
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.
Adding get body function
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

This comment has been minimized.

Show comment
Hide comment
@RaananW

RaananW Oct 19, 2015

Member

Wait with merging, further changes coming.

Member

RaananW commented Oct 19, 2015

Wait with merging, further changes coming.

RaananW added some commits Oct 19, 2015

Rotation fix for Cannon.JS
making sure the bounding box is calculated correctly.
@RaananW

This comment has been minimized.

Show comment
Hide comment
@RaananW

RaananW Oct 19, 2015

Member

All should be fine now.

Member

RaananW commented Oct 19, 2015

All should be fine now.

deltakosh added a commit that referenced this pull request Oct 19, 2015

Merge pull request #761 from RaananW/physics-api-changes
Physics api changes and Oimo fixes

@deltakosh deltakosh merged commit d545f92 into BabylonJS:master Oct 19, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@RaananW RaananW deleted the RaananW: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