If you've ever wanted to write a script that could make your sprite flash a different colour or turn them transparent in Unity, there's an easy way. The following code is C#. Sprite Renderer You're sprite is contained in a component called the Sprite Renderer. Now if you click on "Color", you can manually change... Continue Reading →
Moving one object towards another is a simple enough task, and a Lerp is a good way to get the job done. Lerping can also be used to gradually change one value into another. It's easy to do wrong, so I'll talk about the right way if you want to get a constant speed.
This post describes how to create a simple movement for a 2D top-down game, and it assumes that the reader is a beginner in such topics.
A common task is moving one object towards another position in Unity. Assuming you want constant, linear speed, there are two methods I will discuss: Lerp and MoveTowards.
If you've ever wanted to get all of the children attached to a Unity GameObject and turn them into an array, there is a simple way to do it. This tutorial shows you how to do it in simple C# code.
https://www.youtube.com/watch?v=WKwe6FqQ4hM As part of my games programming course that I am studying, we developed a proto-type 3D graphics engine in C++ using OpenGL. The excercise involved setting up all of the 3D rendering manually so that obj models and fbx models could be loaded in, setting up shaders, programming lighting with mathematical equations, experimenting with... Continue Reading →