#Is it possible to create a ghost prefab with multiple dynamic physics bodies?

1 messages · Page 1 of 1 (latest)

viscid bone
#

I have a hierarchy like this:

Main Body
  BR Wheel
  BL Wheel
  FL Wheel
  BR Wheel

The body and each wheel have their own physics bodies. However when I try this I get this error:

[ClientWorld] The default physics world contains 4 dynamic physics objects which are not ghosts. This is not supported! In order to have client-only physics, you must setup a custom physics world:
- Entity(549:1) BR Wheel
- Entity(550:1) BL Wheel
- Entity(551:1) FL Wheel
- Entity(552:1) FR Wheel```

If I try to put ghost authoring components on each wheel I get an error as per the image shared.

What's the solution here? Craft everything at runtime? Is there a better way to make objects with wheels in netcode/ECS/Unity physics?
marsh pivot
#

Dynamic Physics objects must be roots so they kind of need to be ghosts

#

Unfortunately I don't really have a good solution for you

viscid bone
#

So this can't be one prefab I guess?

viscid bone
#

by spawning things and connecting joints

marsh pivot
#

Maybe, no idea how stable the netcode is going to be though

viscid bone
#

yeah that's a big worry haha

#

I'm thinking of just making this all one object and then just writing a bunch of custom physics code to get the rolling behavior

#

instead of relying on "real" physical wheels

radiant swallow
#

I haven't tried, but maybe using GhostGroup and GhostChildEntity to at least sync it togeather. Not sure if it can be setup bake time and work.

umbral nacelle
#

@viscid bone Hey Praetor, any insights gained from working on this? I am planning a similar setup, with an aircraft that has vectoring thrusters. In my non-ECS solution, I used hinge joints. I'll also be attempting to implement this with netcode for entities