Skip to content

Rotating model with physics resets the rotation #248

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

Closed
4 of 19 tasks
thiervoj opened this issue Jun 1, 2017 · 5 comments
Closed
4 of 19 tasks

Rotating model with physics resets the rotation #248

thiervoj opened this issue Jun 1, 2017 · 5 comments

Comments

@thiervoj
Copy link

thiervoj commented Jun 1, 2017

When importing a model with WHS.Model and applying it a rotation in the constructor with Physics, the object is created with the correct rotation.
Then, when Physics is loaded, the rotation resets to the defaults.
Here is a pen showing the issue on the "arch" object (the Cylinder's rotation works fine) : https://codepen.io/jordanthiervoz/pen/vZBEWO

Version:
  • v2.x.x
  • v1.x.x
Issue type:
  • Bug
  • Proposal/Enhancement
  • Question
  • Discussion

Tested on:
Desktop
  • Chrome
  • Chrome Canary
  • Chrome dev-channel
  • Firefox
  • Opera
  • Microsoft IE
  • Microsoft Edge
Android
  • Chrome
  • Firefox
  • Opera
IOS
  • Chrome
  • Firefox
  • Opera
@sasha240100
Copy link
Member

Fixed in #242. Will be soon in next release

@thiervoj
Copy link
Author

thiervoj commented Jun 6, 2017

The rotation issue seems to be resolved in the beta 9.1 version.
I created an updated pen here : https://codepen.io/jordanthiervoz/pen/yXymQb.

It looks like the physics are not updated for the collisions according to the rotation: the cylinder goes trough the model then bumps in the middle of it.

@sasha240100
Copy link
Member

sasha240100 commented Jun 6, 2017

@thiervoj Open the issue in https://github.com/WhitestormJS/physics-module-ammonext . Looks like it is a scaling problem (data like height, radiusTop, ...)

@sasha240100
Copy link
Member

@thiervoj Okay, I found the problem. You forgot to set scale on your concave mesh. See this example

@thiervoj
Copy link
Author

thiervoj commented Jun 6, 2017

Oh, my bad ! Thanks for that :)

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

No branches or pull requests

2 participants