Jump to content

Multiple Physics Worlds


SpiderPig
 Share

Recommended Posts

Never mind.  Physics objects in two separate worlds don't collide at all.  It turns out that the code I was using to transfer a collider from an entity to a pivot was flawed.

auto box = CreateBox(worldA);

//Transfer Collider to 2nd world
auto pivot = CreatePivot(worldB);
pivot->SetCollider(box->GetCollider());

box->SetCollider(nullptr);

It seems that if I set an entities collider to another object and then remove that collider from the original entity, although the collider is no longer visible when debugging physics, that box still collides.  :huh:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...