Tag Info

New answers tagged

0

Usually this is handled a bit differently. When manipulator is picked, you choose a movement plane (XY, YZ or XZ). Then you cast ray from cursor on to that plane and detect the hit point and move the manipulator (and object) to that location. Special cases you need to work around for are when the plane is parallel to the view and ray from cursor can reach ...


0

You cann't draw one texture on front of the plane and different on back. Use twho planes with different winding order of vertices. You need to implement 4 vertices for create plane 0,0; 0,1; 1,0; 1,1 // Scale it as you wish For front plane use counter clockwise winding order when you creating it 0,0; 1,0; 1,1; 0,0; 1,1; 0,1 For back plane use ...


0

I recommend a 3D models even though they will be super simple. You can texture all sides easily. You can also bend or morph those. Also lighting for effects or from the game table is possible if such things are required.


2

It depends on the implementation of the multiply operation. The internals will suppose an ordering within your matrices, row major or column major. If the ordering of your matrices is arranged the way the function expects them, then it is up to the second dpendancy: namely the respect of the correct mathematical commutativity. (which they should) When you ...


0

You need to implement/find something that can load the model data into verts/normals/uvs. etc. Use something like blender to convert the format into the format of your choice.


1

I think you and the commenters are on the right track. Ideally the hitboxes wouldn't have to be recreated on each attack (unless the nature of the attack were to change, maybe?). You could add something like this to every GameObject that can attack, along with a hitbox Collider marked as a Trigger. public class HitController : MonoBehavior { private Queue ...


0

This is an older question which highlights how fast things have developed in the past few years. The real challenge with VR is the tracking latency. The headset must track head movements in real-time or the overall effect is physically nauseating. The expense of VR headsets has been reduced to virtually (pun) nothing with Google's Cardboard VR. You only ...


0

Think origami. A UV map is like a flattened (unwrapped) 2D shell (skin) of your 3D mesh. If you were to cut out the map and fold it along the mesh lines, the result would be your 3d model. The U,V floating point values range from (0,0) to (1,1) The upper left corner of the UV map is (0,0) The lower right corner is (1,1) Each vertex in a mesh ...


1

MD2 files are just mesh frame arrays. There is no skeleton. Actions are just mesh frame sequences in the array. You can copy the character's md2 file for each weapon. Carefully replace the character mesh with a positioned weapon mesh for each action sequence frame. While labor intensive, this approach allows you to give the weapon movement much more ...


-1

I see two possible solutions. One, is to use a 3D Vector even in a 2D space, and keep one of the coordinates fixed to the same number. Another one, is to create two different classes, Vector2 and Vector3, both inheriting from a base Vector class, and make your systems work with this Vector class directly, looping trough its components.


5

Use a 3D vector. For your 2D components, simply ignore the third component. The extra "cost" of an unused float is trivial in comparison to the rest of your architecture, and things like std::unordered_map<std:;string, Component*> are of far greater performance and memory concern than an occasionally-unused float anyway. You say that this would be ...


1

Try calling p.Apply() in your drawing code to set the effect correctly on the GPU before drawing. foreach (EffectPass p in drawingEngine.CurrentTechnique.Passes) { p.Apply(); // this will set the effect graphics.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, numVertices, 0, numIndices / 3); }


3

3d terrain always comes with a cost: Objects get obscured behind cliffs, so the player needs to rotate the camera to maintain situational awareness. This takes time and disorients the player. They end up fighting the camera more than they fight the enemy. So before you add height levels just for the heck of it, consider how much it adds to your game in ...


1

The supporting point is the point that lies at the penetration depth. If you already have working SAT then you've already used the supporting point as otherwise you'd have no way to find penetration depth for OBBs. The supporting point might be buried or abstracted by the specific implementation of SAT you're using, though (if you derive from basics, you'll ...


0

The problem is that L.Direction vector is not normalized, so the dot product "max(dot(v, toEye)" is calculating |v|*cos Θ instead of cos Θ, which is not what we want. So normalizing it on CPU side solves the problem. Thank you @snake5 for helping me on chat with it.


0

You can use just the camera() method to change the perspective more easily. To use it, you probably want two variables: rotationAngle and elevationAngle. Moving the mouse sideways changes rotationAngle between 0 and TWO_PI. You can then set variable float centerY to sin(rotationAngle) and float centerX to cos(rotationAngle). Moving the mouse up and down ...



Top 50 recent answers are included