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

add constructor for btcollisionworld #356

Closed
wants to merge 7 commits into from
Closed

add constructor for btcollisionworld #356

wants to merge 7 commits into from

Conversation

sancelot
Copy link

@sancelot sancelot commented Feb 5, 2021

No description provided.

@sancelot
Copy link
Author

sancelot commented Feb 5, 2021

refs #181

@bdiblasi
Copy link

I am currently receiving the error: 'cannot construct a btCollisionWorld, no constructor in IDL' when trying to implement the collision world in accordance with the Bullet Collision Interface Demo. I looked through the history on this topic here and it is unclear to me whether or not this feature is supported. I unfortunately cannot contribute, but I wanted to submit my findings for review.

@willeastcott
Copy link
Contributor

btCollisionWorld is the base class for the various sub-type worlds.

https://pybullet.org/Bullet/BulletFull/classbtCollisionWorld.html

PlayCanvas uses the btDiscreteDynamicsWorld subclass:

https://github.com/playcanvas/engine/blob/dev/src/framework/components/rigid-body/system.js#L329

It does appear that btCollisionWorld does appear in the IDL though:

https://github.com/kripken/ammo.js/blob/main/ammo.idl#L863-L879

So I'm a bit confused why you get that error.... 🤔

@bdiblasi
Copy link

Just as a point of reference, I was blindly following the Collision Interface Demo. Thank you for the resource links.

A separate, unrelated note, is that I am trying to implement custom game physics for my character controller. It seems like kinematic bodies do not provide collision data when they contact one another, and that is the reason I've gone down this path. I planned to use pure collision detection, get the world normal of contact and implement game physics accordingly. Would you have any suggestions for a better implementation strategy? I'd like to stay 'in-the-box' with playcanvas since I am also trying to use ammo.js in my multiplayer node.js server, but I'm not sure it will fit.

@bdiblasi
Copy link

I've gotten a similar response whether using the built-in 'Import Ammo' tool, or pasting the raw ammo.js build into a separate script and running the promise.
collisionWorld

@sancelot
Copy link
Author

sancelot commented Feb 25, 2022 via email

@bdiblasi
Copy link

I can see that you modified the ammo.idl file. It looks like the ammo.js file is not updated, is that correct? I do not know how to build the ammo.js file from your fork, if you have a minute could you give me some pointers?

@sancelot
Copy link
Author

sancelot commented Feb 25, 2022

you have to install emscripten compiler and build the projet.

@sancelot
Copy link
Author

but it would be nice if @kripken could merge it.

ammo.idl Outdated Show resolved Hide resolved
ammo.idl Outdated Show resolved Hide resolved
@sancelot sancelot closed this by deleting the head repository Jan 16, 2024
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.

4 participants