**Hello There,**

(also sorry for sloppy writing i’m on only like 4 hours of sleep)

This is a simple documentation on calculating a players collision on a 45 45 90 triangle - im writing this in regards of @Crosbyman64 and making it a topic so others can also use my thoughts.

One useful equation to note would be the slope function or as commonly known **a^2 + b^2** = **c^2**

**Example:**

This is useful as we’re able to take the length of the slope to calculate the height corrections,

**First** we start with finding the x and y values of each object so we need the players and the slopes. (This is only used on other shaped triangles then a Right Triangle)

## Pro Tip

Make the x and y values a variable so it can be changed by any object its simply needed two things a new personal variable called x and one called y and this line of code,

```
When(Game Is Playing)
Set Position ((self) x ) , ((self) y )
```

**Current Variables:**

*Player X
Player Y
(Self) X
(Self) Y*

**Second** we must find the distance of the x Values we will simply do this by subtracting the slope x from the players x.

**Player X
-Slope X**

**New Variables**

*(self) X Distance
(self) Slope Height*

**Third** we will then find the need height based off of our distance,

```
Set((Self) Slope Height) , ((((Slope) X) + ((Slope) X Distance) + (((Player) Height) + 1)
```

**Lastly** we then use @Spy_Guy_96 Platformer collision code to detect the certain sides if u would like a tutorial on that let me know and ill provide with **Spy-Guys Exclusive Permission Only**

Thank you for reading!