#Does Entity's Colliders interact with colliders of GameObject?

1 messages · Page 1 of 1 (latest)

worn ore
#

If it is, how can I do it? Because in my scene entity interacts only with Colliders that is part of Entities.

#

Does Entity's Colliders interact with colliders of GameObject?

sonic raft
#

no

#

two different physics engines

worn ore
#

Okay, so, GO and Entities are absolutely separate?

sonic raft
#

yes

worn ore
#

@sonic raft
In what cases GO and Entities can interact?

#

In general.

sonic raft
#

Usually you don't implement them as separate modules. You just use GameObjects as "services" for entities

#

say you want AudioSource. You just create game object with it and control it based of data on entity from within a system

#

this is usually called "Hybrid"

#

so basically GameObjects are only used for "presentation" layer of game. While everything else is implemented within ECS

worn ore
sonic raft
#

class components yes

worn ore
#

Class, not structs?

sonic raft
#

public class GameObjectHolder : IComponentData { public GameObject instance; }

#

yes

#

class components are much slower, so you should only resort for them for hybrid purposes

worn ore
#

Thanks for clarification, where can I read about hybrid approach?

#

Or watch, doesn't matter.

sonic raft
#

ugh, not sure if there are any resources I can recommend

#

most stuff I was learning from is outdated by many years at this point 😅

#

a little page on manual

#

but that's just basics

worn ore
#

Damn it.

#

I don't understand UniTech in this way. They released cool tech stack, but no centralized resources and tools for DOTS.

#

Like it early access or experimental package.

#

So stupid.

sonic raft
#

there are also tons of samples

#

also some manual in this repo as well

#

this is just not realted to hybrid

#

because hybrid itself is pretty simple conceptually

eternal kraken
#

Yep, hybrid is not DOTS, but a conceptual bridge between Entities and GameObjects. How to build that bridge is totally on you. But it's the easy part since once you know how to do ECS things in ECS way, you'll know how to design it.

#

The hard part is ECS/DOTS itself.

worn ore
#

It's simpler for me than OOP paradigm (I hate it) and I like Data-Oriented approach.

#

More question is how ECS implemented in Unity, API questions and how to do X thing.

#

Not ECS itself.

sonic raft
#

it has all basics