How can I obtain/change an Entities' texture coordinates?
-
- Posts: 249
- Joined: Wed Nov 17, 2010 1:49 pm
How can I obtain/change an Entities' texture coordinates?
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?
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.