Archived

This topic is now archived and is closed to further replies.

ALH

Working with entity arrays

Recommended Posts

Are you transforming each of them immediately before you render?

You need to group the PR_TransformEntity (entities[i]); and PR_RenderEntity(entities[i]); calls together.

Transforming all of them then rendering all of them will not work, since they might be sharing the same object definition.

Share this post


Link to post
Share on other sites
You're correct I was transforming each one of them and then rendering each one of them, when I grouped the TransformEntity/RenderEntity, setting both side by side, everything works fine.

Thank you very much. That came in a good time too, because I was about to try implement a class structure. :-)

Share this post


Link to post
Share on other sites
Hi! I am having some trouble in working with entity arrays. I am able to declare/load/free them ok, but when I try something like:

PR_PositionEntity(Rocks_entity[intRocks], Xpos, Ypos,Zpos);
//or
PR_MoveEntity(Rocks_entity[intRocks],Xpos,Ypos,Zpos);

They doesn't seem to move independently, when setting diffrent values to intRocks, Xpos,Ypos and Zpos (diffrent entities).

It's not supposed to work, or may I be doing something wrong?

Share this post


Link to post
Share on other sites