Page 1 of 1

How can I obtain/change an Entities' texture coordinates?

Posted: Wed Nov 24, 2010 12:37 pm
by Spankenstein
If I create a compound body and I wish to assign texture coordinates to it, is there a specific parameter to store the data other than using the .Tag parameter?

Re: How can I obtain/change an Entities' texture coordinates?

Posted: Wed Nov 24, 2010 12:42 pm
by Norbo
The physics engine itself doesn't know anything about texture coordinates (or graphics in general), so if you just wanted some place to store arbitrary information on an Entity, Tag would be it. I usually prefer to avoid attaching rendering data to entities when possible in favor of 'game entities' owning physics entities. That way, all the graphics and non-physics stuff can be a part of the 'game entity' just like the physics entity is, and you never have to blur the line between the physics and other systems.