Jump to content
  • Advertisement

Archived

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

ALH

Working with entity arrays

This topic is 6864 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!