Hot answers tagged

16

We can do this by making a custom version of the standard sprite shader (so it still does everything the one you're used to can do), and modifying its blending operation. Start by going to the Unity Download Archive, and grab the built-in shaders for the version of Unity you're using. I'm currently on 2020.3.7f1 (LTS) Inside that zip, you'll want to copy ...


2

First of all, you should know that Factorio is one of the few game projects where the technical requirements are so unusual that writing a custom engine actually made sense. The core of Factorio is written in C++, and the developers are using a lot of low-level optimization tricks to make that humongous number of entities moving around and doing stuff in a ...


1

A simple approach would be to just render the text twice, first with the ligher color, and then with the main color but offset by a pixel down, so that only the top edges of the characters rendered with the ligher color will stay visible.


1

In real life, weapons have their sights (whether metallic, reddot, optical scope, etc.) slightly above the barrel axis. To compensate for this, the sights axis is usually set to point slightly down such that the sight axis and the barrel axis cross at a distance X, for example 100 m. It means that if you aim at a target 100 m away from you, the bullet will ...


1

If you want the position of a 3D object on screen, you can do the following: var position_2d = get_viewport().get_camera().unproject_position(position_3d) That is, we use the camera projection to get the 3D position into screen coordinates with Camera.unproject_position which takes a Vector3 and returns Vector2. Why is that unproject and not project? Don't ...


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