Tag Info

New answers tagged

2

I understand that you are at a loss. I also liked to hack pixels when I was young, and did some games on calculator devices, or dos era this way. This can still be done today, but, because of various hardware history of evolutions, it has become more involved. CPU pixel pushing Notably, we can still push pixels one by one, but it would be incredibly slow ...


2

I'm also from a pixel-banging background. PEEK and POKE anyone? Using a GPU is a different mind-set entirely. (Well, it's still code, so just "more of the same...) The GPU is really good at certain things: Processing individual pixels (through textures and fragment shaders), and filling triangles with pixels. Much effort (on the programmer's part) is ...


0

There are two problems in using billboard sprites in these kind of engines. First, determine the view, if there is more than one, that you should display given the orientation of both the object and the player. Second, drawing the billboard itself. Assuming that your sprite has only one image, you can choose to render it at the same time you render your ...


2

Box cast would probably be more performant since it's only checking 4 vertices but it'll definitely be more accurate, at least depending on what you want. Good idea! Example use: RaycastHit2D raycast = Physics2D.BoxCast ( //Starting point of box Vector2d.zero, //Width of box, 2f, //Angle of box (in radians), 0f, //Height of ...


0

Hope this may help : (from Physics.Raycast docu) Notes: Raycasts will not detect colliders for which the raycast origin is inside the collider. If you move colliders from scripting or by animation, there needs to be at least one FixedUpdate executed so that the physics library can update it's data structures, before a Raycast will hit the collider at it's ...


2

Two dot products, using the vector between their centers, tells you which corner is closest. A positive "Forward" dot indicates a front corner; negative is rear. A positive "Right" dot indicates a right corner; negative is left. If the distance between the selected corner and the friendly is less than Range, it is in-range. Nearest-corner test: This will ...



Top 50 recent answers are included