- Joined
- Dec 16, 2007
- Messages
- 252
Okey. I tried with this formula but didn't work. I'm trying to make a bounce angle.
This trigger works great. Except in some cases, it can't check if the wall is either south or north, west or right. Example with this code, let's say the red line is 45 degrees, which means it's reflection should be 315 degrees. And in this case it works great.
But when I use this formula and try to bounce to the south direction, it went like this.
The red line is still 45 degrees, but this time it also reflect 315 degrees, right in the wall, the black line. But it should have bounced 135 degrees, the white line. I can solve this by doing 180-Facing of unit, then the south wall will work, but then the right wall will be messed up. So I need to find a way to somehow check where I hit.
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Facing of Unit1[(Integer A)]) Greater than or equal to 180.00
-
Then - Actions
- Set RM_Angle[(Integer A)] = (540.00 - (Facing of Unit1[(Integer A)]))
-
Else - Actions
- Set RM_Angle[(Integer A)] = (360.00 - (Facing of Unit1[(Integer A)]))
-
If - Conditions
This trigger works great. Except in some cases, it can't check if the wall is either south or north, west or right. Example with this code, let's say the red line is 45 degrees, which means it's reflection should be 315 degrees. And in this case it works great.
But when I use this formula and try to bounce to the south direction, it went like this.
The red line is still 45 degrees, but this time it also reflect 315 degrees, right in the wall, the black line. But it should have bounced 135 degrees, the white line. I can solve this by doing 180-Facing of unit, then the south wall will work, but then the right wall will be messed up. So I need to find a way to somehow check where I hit.