Skip to content

Instantly share code, notes, and snippets.

View pomettini's full-sized avatar
🦀
Code speaks for itself

Giorgio Pomettini pomettini

🦀
Code speaks for itself
View GitHub Profile
@pomettini
pomettini / TextRevealer.cs
Created August 12, 2025 00:47 — forked from miguelSantirso/TextRevealer.cs
Letter by letter reveal a paragraph of text in a smooth way
using System.Collections;
using System.Text;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
public class TextRevealer : MonoBehaviour
{
[UnityEngine.Header("Configuration")]
public int numCharactersFade = 3;
@pomettini
pomettini / cloudSettings
Created January 13, 2020 01:48
Visual Studio Code Settings Sync Gist
// Empty
@pomettini
pomettini / main.c
Created December 12, 2018 22:50
An highly expressive metaprogramming language for your pROBramming pleasure
#include "rdilang.h"
#include <stdio.h>
#include <string.h>
RAGAZZE
VI_RICORDO length CHE
VI_SEGNALO name[666] CHE
UNREAL
CI_METTE_A_DISPOSIZIONE("Tell me your name\n")
MI_ASPETTO(name)
@pomettini
pomettini / exercise1.py
Last active May 2, 2018 22:04
Python Maya basic exercises
'''
Script 1
Write a procedure that has 4 arguments: 3 strings (objA, objB, objC) and 1 int x_number
when running the proc, objC should get duplicated x_number of times
and be distributed evenly in a line between objA and objB.
'''
import maya.cmds as cmd
import math
@pomettini
pomettini / exercise1.mel
Last active April 22, 2018 18:59
MEL Basic Exercises
/*
Script 1
Write a script that will create 3 polySpheres and 3 polyCubes.
The 3 polySphere should be place 5 units from each other in X. but not moved in Y or Z.
The 3 polyCubes should be on top of the spheres in the viewport (3 units above)
The first cube should have a red lambert material assigned to it,
The second cube should have a green lambert material assigned to it
The third cube should have a blue blinn material assigned to it.
Put comments in your code for documentation...
@pomettini
pomettini / MoveMouseByCurvePlugin.cpp
Last active February 11, 2020 15:42
Unreal Engine 4 Plugin that moves the cursor along a Curve
#include "MoveMouseByCurvePlugin.h"
#define LOCTEXT_NAMESPACE "FMoveMouseByCurvePluginModule"
void FMoveMouseByCurvePluginModule::StartupModule()
{
UE_LOG(LogTemp, Warning, TEXT("Moving curve along mouse start initialization"));
FConsoleCommandWithArgsDelegate MoveMouseDelegate;
MoveMouseDelegate.BindRaw(this, &FMoveMouseByCurvePluginModule::MoveMouseAlongCurveWithPath);
@pomettini
pomettini / MoveSceneByCurve.cpp
Created February 12, 2018 11:36
Unreal Engine 4 Component that moves a SceneComponent by a curve
#include "MoveSceneByCurve.h"
UMoveSceneByCurve::UMoveSceneByCurve()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
PrimaryComponentTick.bCanEverTick = true;
}
// Called when the game starts
@pomettini
pomettini / SpaceshipPawn.cpp
Created February 8, 2018 23:49
Unreal Engine 4 Custom Pawn Class to control a Spaceship
#include "SpaceshipPawn.h"
// Sets default values
ASpaceshipPawn::ASpaceshipPawn()
{
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
USphereComponent * SphereComponent = CreateDefaultSubobject<USphereComponent>(TEXT("RootComponent"));
RootComponent = SphereComponent;
SphereComponent->InitSphereRadius(40.0f);
@pomettini
pomettini / MovePlayerByCurve.cpp
Last active February 8, 2018 14:02
Unreal Engine 4 Component that moves an actor by a curve
#include "MovePlayerByCurve.h"
// Sets default values for this component's properties
UMovePlayerByCurve::UMovePlayerByCurve()
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
PrimaryComponentTick.bCanEverTick = true;
}
@pomettini
pomettini / GifImportFactory.cpp
Last active February 27, 2018 02:20
Unreal Engine 4 Gif Importer
#define STB_IMAGE_IMPLEMENTATION
#include "GifImportFactory.h"
#include "stb_image.h"
#include <stdlib.h>
UGifImportFactory::UGifImportFactory()
{
bEditorImport = true;
SupportedClass = UTexture2D::StaticClass();