Re-implemented turn_to command (#390)

* Re-implemented turn_to command

Fixes #385
Fixed a bug in esc_movable blocking player_orients_on_arrival for ESCLocation nodes

* docs: Automatic update of API docs

* Fixes

Co-authored-by: StraToN <StraToN@users.noreply.github.com>
This commit is contained in:
Julian MurgiaandStraToN authored and GitHub committed 2021-09-09 22:57:03 +02:00
1 parent ad390a6f65
commit 0e6e8aa161
14 files changed
+148 -102

No files matched your search

+14
View File
@@ -362,6 +362,20 @@ Set the angle
#### Parameters
- deg: The angle degree to set
- immediate: Set the angle immediately. If false will show intermediate
angles
### turn\_to
```gdscript
func turn_to(object: Node, immediate = true)
```
Turn to face another object
#### Parameters
- deg: The angle degree to set
- immediate: Set the angle immediately. If false will show intermediate
angles
+15
View File
@@ -182,6 +182,21 @@ Sets character's angle and plays according animation.
If true, direction is switched immediately. Else, successive
animations are used so that the character turns to target angle.
### turn\_to
```gdscript
func turn_to(item: Node, immediate = true) -> void
```
Turns the character to face another item or character.
#### Parameters
- item_id id of the object to face.
- immediate
If true, direction is switched immediately. Else, successive
animations are used so that the character turns to target angle.
### get\_shortest\_way\_to\_dir
```gdscript
+2 -7
View File
@@ -6,14 +6,9 @@
## Description
`turn_to object degrees [immediate]`
`turn_to object object_to_face [immediate]`
Turns object to a degrees angle with a directions animation.
0 sets object facing forward, 90 sets it 90 degrees clockwise ("east") etc.
When turning to the destination angle, animations are played if they're
defined in animations. object must be player or interactive. degrees must
be between [0, 360] or an error is reported.
Turns object to face another object.
Set immediate to true to show directly switch to the direction and not
show intermediate angles
+2 -7
View File
@@ -351,14 +351,9 @@ Sets the position of object1 to the position (x,y).
#### <a name="TransitionCommand.md"></a>`transition transition_name in|out` [API-Doc](api/TransitionCommand.md)
Performs a transition in our out manually.
#### <a name="TurnToCommand.md"></a>`turn_to object degrees [immediate]` [API-Doc](api/TurnToCommand.md)
#### <a name="TurnToCommand.md"></a>`turn_to object object_to_face [immediate]` [API-Doc](api/TurnToCommand.md)
Turns object to a degrees angle with a directions animation.
0 sets object facing forward, 90 sets it 90 degrees clockwise ("east") etc.
When turning to the destination angle, animations are played if they're
defined in animations. object must be player or interactive. degrees must
be between [0, 360] or an error is reported.
Turns object to face another object.
Set immediate to true to show directly switch to the direction and not
show intermediate angles