Tag Info

Hot answers tagged

4

I would do this by rendering textured quads. A single laser beam would be two rectangles intersecting each other at the center by a perpendicular angle, each sharing the same texture of the laser beam. Not very much to it, you can use instancing for them, with a very simple pixel shader which just samples the texture, oh and additive blending.


3

You can also assume that "laser beam" is cylinder, and create a billboard for that: http://www.opengl-tutorial.org/intermediate-tutorials/billboards-particles/billboards/


3

Your LevelCollider is attached to a Collider that is a trigger. That means it will not call OnCollisionEnter. It will call OnTriggerEnter. Try adding this to LevelCollider: void OnTriggerEnter(Collider other) { Application.LoadLevel("Level1"); } That should do ya!


2

Detect collisions with OnCollisionEnter then load your level there. I.e.: void OnCollisionEnter (Collision col) { Application.LoadLevel("Level1"); } If your character's Collider is a trigger, then you need to use OnTriggerEnter. I.e.: void OnTriggerEnter (Collider other) { Application.LoadLevel("Level1"); } If neither of these work, try ...


2

A hard but probably better way: if you walk on surfaces you would use navigation mesh based on triangles that share edges. In 3D space you could use tetrahedrons that share faces. Tetrahedrons should be able to fill your space reasonably and running A* on the graph of tetrahedra should be much faster, as you would probably not need so many of them. As in ...


1

This article by Itay Keren excellently covers camera systems: https://docs.google.com/document/d/1iNSQIyNpVGHeak6isbP6AHdHD50gs8MNXF1GCf08efg/pub?embedded=true He explains a plethora of 2D camera techniques, along with their advantages and disadvantages. This should let you design the perfect camera for your use case. You'd probably be most interested in ...


1

Allow me to offer one interesting consideration for mobile devices where 2D performance can actually lag behind low poly 3d models: 1) Fill rate can cause quite a bit of performance trouble when dealing with many sprites on screen at a given time. 2) Texture memory requirements for a fully fleshed out 2D game are actually much higher if you're using frame ...


1

You can use an Orthographic projection matrix to transform your vertexes. Then you can simply provide your triangle verts in terms of screen pixels, e.g.: a vertex at (0,0), one at (10, 0) and one at (5, 10). Here's another reference of OpenGL matrices, with a lot of maths. Make sure to do a search for "OpenGL orthographic projection" and "2D drawing with ...


1

The mouse is in the screen coordinates. The screen is two dimensional. And you are trying to convert the 2d screen coordinates to 3d world coordinates. You need to specify the desired z position to the mouse position vector (you can think of it as the distance from the camera): var mousePos = Input.mousePosition; mousePos.z = 10f; mousePos = ...



Only top voted, non community-wiki answers of a minimum length are eligible