entity colour
entity colour
How can I select the colour/s of a sphere created with the help of BEPU?
Re: entity colour
Did you get my e-mail? I'm not sure if it went through, but here's a way to do it:
Currently, color is randomly set in the EntityDrawer.addEntity and EntityDrawer.addDisplayObject methods within the demos display system. There are cases that cover shader instancing and non-shader instancing modes within these methods, either taking a texture for non-shader instanced objects or a texture index for shader instanced objects. Secondary methods which have a parameter of a color texture or index could be added to replace the random method.
Then, at the end of the startSimulation method of Demos.cs, you could remove the DisplayObject creation. This would then require each entity added to the space to also be manually added to the entity drawer. Alternatively, setting an entity’s tag with entity.tag = “noDisplayObject” will prevent that block from adding that specific entity to the entity drawer. The special color defining addEntity or addDisplayObject could then be used manually for only that entity.
Currently, color is randomly set in the EntityDrawer.addEntity and EntityDrawer.addDisplayObject methods within the demos display system. There are cases that cover shader instancing and non-shader instancing modes within these methods, either taking a texture for non-shader instanced objects or a texture index for shader instanced objects. Secondary methods which have a parameter of a color texture or index could be added to replace the random method.
Then, at the end of the startSimulation method of Demos.cs, you could remove the DisplayObject creation. This would then require each entity added to the space to also be manually added to the entity drawer. Alternatively, setting an entity’s tag with entity.tag = “noDisplayObject” will prevent that block from adding that specific entity to the entity drawer. The special color defining addEntity or addDisplayObject could then be used manually for only that entity.