alecthomas / alecthomas/entityx

Passing an entity as a pointer (Question)

Aperta
#238 11 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
2.3k
Fork
301
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi @alecthomas , great library!

I have a scenario in one of my projects, where I need to pass an entity or a component to the physics engine (bullet) as a pointer (void*).

When I am trying to receive the pointer back, if I cast it to an entity for example, I can't access any of the components because It gives me some error like the id is invalid or if I am trying to use the id it tells me that the index is smaller than the component mask (or something close to this).

Is there any other way to pass an entity as a pointer and access it in some other part of the code without being invalid?

Thanks.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.