about summary refs log tree commit diff stats
path: root/assets/pilgrimage.yaml
blob: 04487da9a1f7a1d64c50f446b968732191388589 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
  - room: Second Room
    door: Exit Door
  - room: Hub Room
    door: 1 Sunwarp
    sunwarp: True
  - room: Crossroads
    door: Tower Entrance
  - room: Orange Tower Fourth Floor
    door: Hot Crusts Door
  - room: Hot Crusts Area
    door: 2 Sunwarp
    sunwarp: True
  - room: Orange Tower Third Floor
    door: 3 Sunwarp
    sunwarp: True
  - room: Outside The Initiated
    door: Shortcut to Hub Room
  - room: Orange Tower First Floor
    door: Shortcut to Hub Room
  - room: Orange Tower First Floor
    door: 4 Sunwarp
    sunwarp: True
  - room: Directional Gallery
    door: Shortcut to The Undeterred
  - room: Orange Tower First Floor
    door: Salt Pepper Door
  - room: Hub Room
    door: Crossroads Entrance
  - room: Orange Tower Fourth Floor
    door: 5 Sunwarp
    sunwarp: True
  - room: Color Hunt
    door: Shortcut to The Steady
  - room: The Bearer
    door: Entrance
  - room: Art Gallery
    door: Exit
  - room: The Tenacious
    door: Shortcut to Hub Room
  - room: Outside The Agreeable
    door: Tenacious Entrance
  - room: Outside The Agreeable
    door: 6 Sunwarp
    sunwarp: True
0: rotate += 4 rotate *= 90 var target_painting = target.get_parent() # this is ACW if rotate == 0: body.translation.x = ( target_painting.translation.x + (body.translation.x - painting.translation.x) ) body.translation.y = ( target_painting.translation.y + (body.translation.y - painting.translation.y) ) body.translation.z = ( target_painting.translation.z + (body.translation.z - painting.translation.z) ) elif rotate == 180: body.translation.x = ( target_painting.translation.x - (body.translation.x - painting.translation.x) ) body.translation.y = ( target_painting.translation.y + (body.translation.y - painting.translation.y) ) body.translation.z = ( target_painting.translation.z - (body.translation.z - painting.translation.z) ) body.rotate_y(PI) body.velocity = body.velocity.rotated(Vector3(0, 1, 0), PI) elif rotate == 90: var diff_x = body.translation.x - painting.translation.x var diff_y = body.translation.y - painting.translation.y var diff_z = body.translation.z - painting.translation.z body.translation.x = target_painting.translation.x + diff_z body.translation.y = target_painting.translation.y + diff_y body.translation.z = target_painting.translation.z - diff_x body.rotate_y(PI / 2) body.velocity = body.velocity.rotated(Vector3(0, 1, 0), PI / 2) elif rotate == 270: var diff_x = body.translation.x - painting.translation.x var diff_y = body.translation.y - painting.translation.y var diff_z = body.translation.z - painting.translation.z body.translation.x = target_painting.translation.x - diff_z body.translation.y = target_painting.translation.y + diff_y body.translation.z = target_painting.translation.z + diff_x body.rotate_y(3 * PI / 2) body.velocity = body.velocity.rotated(Vector3(0, 1, 0), 3 * PI / 2) func _dir_to_int(dir): if dir == "north": return 0 elif dir == "west": return 1 elif dir == "south": return 2 elif dir == "east": return 3 return 4