Skip to content

Instantly share code, notes, and snippets.

View drakfyre's full-sized avatar

Maximilian Maroe drakfyre

View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
// Put this script on a cube in your scene to build a pyramid shell under it
public class PyramidSpawner : MonoBehaviour
{
[Header("Settings")]
public int layers = 5; // The desired height of your pyramid in cubes

When starting work on a new feature or bugfix:

  1. checkout the main branch
  2. pull
  3. Create a new branch and name it after the feature or bug
  4. checkout the new branch (this will be automatic on Sourcetree, but not on cmd git)

To work on a feature or bugfix:

  1. checkout the branch you want to work on

image

Before the airplane, many engineers said that flight was impossible for man.

image

Agreed. Uncover is the key word; the responsibilities are intrinsic, the technology uncovers them.
As they said: "we didn't need the right to be forgotten to be written into law". But we had the right to be forgotten, and wished to maintain it.

image

Latest Session

The following is a conversation with https://chat.openai.com/chat
My questions are bold, AI responses are below them.

How would you make an object follow another object using physics in c++ Unreal?

To make an object follow another object using physics in Unreal Engine (UE4), you could use a physics constraint. Constraints are used to control the movement of objects in the physics simulation of UE4.

To create a constraint that would make one object follow another, you could use a "point-to-point" constraint. This type of constraint allows you to specify two anchor points, one on each object, that will be connected by a spring. The spring will apply a force to the objects, pulling them together and causing one object to follow the other.

Official documentation here: https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/GameplayArchitecture/Functions/

Most commonly used UFunctions (Blueprint stuff):

Command Description
BlueprintCallable Makes the function available to Blueprint.
BlueprintImplementableEvent Event that you can define inside Blueprint. If it is not defined, it will do nothing.
BlueprintNativeEvent Event that you can define inside Blueprint AND set up a default implementation in C++ (Declares an additional function named the same as the main function, but with _Implementation added to the end, which is where code should be written.)
BlueprintPure Same as BlueprintCallable but the function does not affect the state of the owning object. (It doesn't say so in the Unreal documentation but it probably shouldn't affect any other objects either, it should just take in data and output data.)
@drakfyre
drakfyre / .gitignore
Last active April 22, 2022 23:07
Gitignore file for VTOL VR
/VTOLVR_Data/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SetCameraDepthMode : MonoBehaviour
{
// You can have any of the options set, so I split the options here with booleans
// Cleaner way to do this would be to use this: https://forum.unity.com/threads/property-drawer-for-enum-flags-masks-download.517750/
// But this is simpler to understand and only requires this file itself so that's what I'm going with
public bool depth = false;
@drakfyre
drakfyre / .gitattributes
Created February 2, 2018 00:10 — forked from FullStackForger/.gitattributes
.gitattributes for Unity3D with git-lfs
# Unity
*.cginc text
*.cs diff=csharp text
*.shader text
# Unity YAML
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf

Keybase proof

I hereby claim:

  • I am drakfyre on github.
  • I am drakfyre (https://keybase.io/drakfyre) on keybase.
  • I have a public key ASCSFRhQvPV6QfTouamSY0Za82ltDDK_SFAY_JQdNJLYqgo

To claim this, I am signing this object: