alecthomas / alecthomas/entityx

Passing an entity as a pointer (Question)

オープン
#238 コメント 11 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C++
スター
2.3k
フォーク
301
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。