Skip to content

Releases: ChristianBackstrom/GameplayMathematics

Noise

Choose a tag to compare

@ChristianBackstrom ChristianBackstrom released this 17 Nov 11:10

For noise i decided to make a grid with nodes. These nodes have their position and a vector pointing in a direction. These direction vectors are rotate around the Z axis an amount depending on a float from a 2d perlin noise. This in result will give me flow field. With this flowfield i put down balls using Unreals physics and apply a force every tick depending on the closest nodes direction vector. This gives me a really rough fluid simulation(it is kinda slow and better representation of fluid simulation can definitely be done).

All the code for this is in PerlinNoiseFlowField.cpp and PhysicsBall.cpp

Collision

Choose a tag to compare

@ChristianBackstrom ChristianBackstrom released this 15 Nov 12:57

Simple collision between spheres inside of another sphere.

Code in SimpleCollision.cpp

Intersection

Choose a tag to compare

@ChristianBackstrom ChristianBackstrom released this 13 Nov 14:53

Base actor has intersection spheres relative to it and if test actor comes into contact withing its radius and the intersection spheres radius, the intersection sphere will change color from red to green.

Code in intersection.cpp

Interpolation

Choose a tag to compare

@ChristianBackstrom ChristianBackstrom released this 13 Nov 11:40

Testactors location is interpolated linearly between base actors up, left, down, right, forward and behind locations repeatedly.

Code is in Interpolation.cpp

State & Context

Choose a tag to compare

@ChristianBackstrom ChristianBackstrom released this 13 Nov 10:58

Excercise 1, displaying different colored lines between two objects depending on test objects position relative to the base actor.

Displays red line between them if test actor is left or right of base.
Displays green line between them if test actor is above or below of base.
Displays blue line between them if test actor is in front or behind of base.

code is in Orientation.cpp