3,155 reputation
616
bio website charcostudios.com
location Spain
age
visits member for 3 years, 4 months
seen yesterday

Oct
27
answered In XNA 4, how can I access SpriteBatch's transformMatrix in my shader?
Oct
2
comment Handle many objects to draw in XNA
in 4) with big tiles you have to divide them in several small ones
Oct
2
answered Handle many objects to draw in XNA
Sep
24
awarded  Autobiographer
Sep
22
answered Can you save a png in XNA larger than the backbuffer width?
Sep
6
comment Depth of overlap between circle and rectangle
stackoverflow.com/questions/1073336/…
Sep
6
comment Why are my sprite outlines partially rendering in the wrong place?
I though you was rotating your ship about its center, better than divide by 128, change w/128 and h/128 by 0
Sep
4
revised Why are my sprite outlines partially rendering in the wrong place?
added 783 characters in body
Sep
4
comment Why are my sprite outlines partially rendering in the wrong place?
if your intialization method has this code square = new Texture2D( GraphicsDevice, 100, 100 ); square.CreateBorder( 5, Color.Red ); It has to run without problem
Sep
4
revised Why are my sprite outlines partially rendering in the wrong place?
added 148 characters in body
Sep
4
answered Why are my sprite outlines partially rendering in the wrong place?
Sep
1
revised Get highest (Y-axis) vertices from primitive d20 dice in xna
added 1136 characters in body
Sep
1
comment Get highest (Y-axis) vertices from primitive d20 dice in xna
Faces share vertices so it's hard to calculate this way... If you want continue using vertices at least use only one per face, and it should be the center of the face to make them univocal. You know the center of a shape is the sum of the position divided by the numbre of vertices
Sep
1
revised Get highest (Y-axis) vertices from primitive d20 dice in xna
deleted 680 characters in body
Aug
31
comment Get highest (Y-axis) vertices from primitive d20 dice in xna
If you have a triangle that is part of a face, with vertex A,B,C the cross product of (B-A) and (C-A) vector gives you the normal. It depends on (A,BC) order to point out or in. But if all triangle vertices have the same order there is no problem with that.
Aug
31
comment Get highest (Y-axis) vertices from primitive d20 dice in xna
I'm sure it has a transform matrix... you need it to draw the dice right
Aug
31
revised Get highest (Y-axis) vertices from primitive d20 dice in xna
added 68 characters in body
Aug
31
revised Get highest (Y-axis) vertices from primitive d20 dice in xna
added 675 characters in body
Aug
31
comment Get highest (Y-axis) vertices from primitive d20 dice in xna
if you want to use positions, you can transform your position with the rotation matrix, Vector3.Transform(vertexPos, rotationMatrix), but you will have to track what position owns to each face, and each face has at least three positions to check because different faces can share the same vertices, with normals each face is univocally identified
Aug
31
comment Get highest (Y-axis) vertices from primitive d20 dice in xna
It's not xna related problem, it's algebra ;) Each face has a normal, you can calculate it from three vertex as the cross product of (B-A)x(C-A), and you will need them when you want to apply some lighting to your model. This solution only calculates the Vector3.UnitY that is the vector of the face facing up in the rotated space, and later in that rotated space coords check agains every face normal, when the angle is 0 or near 0, it means that is the same direction and that is your face.