alecthomas / alecthomas/entityx

Passing an entity as a pointer (Question)

Đang mở
#238 11 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
2.3k
Fork
301
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.