Tag Info

New answers tagged

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 ...


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/


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.


0

You will probably have an easier time with a catmul rom spline. You give points for the path to pass through and it figures out the rest. A catmul rom spline is a type of Hermite spline, which is a different mathematical form of bezier splines. http://www.mvps.org/directx/articles/catmull/


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 ...


0

I found that it is because I was using a dynamic body rather than a kinematic body. I still have a bit of learning in regards to how physics works with scene kit.


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 ...


0

You can add a box collider (Add -> Physics -> Box Collider) in the inspector. Then, add a script with a function OnCollisionEnter(Collision other) then add that script to the cube you want to collide with. More info in here: https://unity3d.com/learn/tutorials/modules/beginner/physics/colliders-as-triggers


0

The command to load a level is Application.LoadLevel(). Call that from an "On Collision" function on the cube.


0

The easiest way to rotate an object to face the direction of its velocity is to represent the rotation as a vector. Unity's physics does this internally, but unfortunately won't let you access any of these variables. Instead, you can simply apply Torque which will do everything for you (it's not good to use a physics engine and apply physics yourself). ...


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 = ...


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 ...


3

Take a look at hierarchical A* (aka HPA*); its basically what you're looking for. However, keep in mind that adding pre-processing can add so much overhead that it might not be worth it. You will want to profile your existing planner first to make sure there aren't any obvious bottlenecks. Another thing you can try is to create a sparse probabalistic road ...


1

I haven't digested all of your code. Consider the effect of using the center of the rear axle as the vehicle's origin and have that point ride the actual Bezier. As such, the car's forward direction is coincident with the tangent. Both of these relate to the path of a real car. The front wheels just need to always point directly toward their ...


0

By speculation - this is what it looks like to me. The arrows seem to, as others say, have an extra variable to determine their height. It looks like an X and Y velocity of the dart might be determined by the direction and power of the power bar, with a predetermined height. I'm not sure if the darts are shot at an upward angle. If not then the flight time ...



Top 50 recent answers are included