bevy/assets/models
Chris Biscardi 4d3f43131e
Use a ship in Transform::align example (#13935)
# Objective

The documentation for
[`Transform::align`](https://docs.rs/bevy/0.14.0-rc.3/bevy/transform/components/struct.Transform.html#method.align)
mentions a hypothetical ship model. Showing this concretely would be a
nice improvement over using a cube.

> For example, if a spaceship model has its nose pointing in the
X-direction in its own local coordinates and its dorsal fin pointing in
the Y-direction, then align(Dir3::X, v, Dir3::Y, w) will make the
spaceship’s nose point in the direction of v, while the dorsal fin does
its best to point in the direction w.


## Solution

This commit makes the ship less hypothetical by using a kenney ship
model in the example.

The local axes for the ship needed to change to accommodate the gltf, so
the hypothetical in the documentation and this example's local axes
don't necessarily match. Docs use `align(Dir3::X, v, Dir3::Y, w)` and
this example now uses `(Vec3::NEG_Z, *first, Vec3::X, *second)`.

I manually modified the `craft_speederD` Node's `translation` to be
0,0,0 in the gltf file, which means it now differs from kenney's
original model.

Original ship from: https://kenney.nl/assets/space-kit

## Testing

```
cargo run --example align
```

![screenshot-2024-06-19-at-14 27
05@2x](https://github.com/bevyengine/bevy/assets/551247/ab1afc8f-76b2-42b6-b455-f0d1c77cfed7)
![screenshot-2024-06-19-at-14 27
12@2x](https://github.com/bevyengine/bevy/assets/551247/4a01031c-4ea1-43ab-8078-3656db67efe0)
![screenshot-2024-06-19-at-14 27
20@2x](https://github.com/bevyengine/bevy/assets/551247/06830f38-ba2b-4e3a-a265-2d10f9ea9de9)
2024-06-20 00:58:00 +00:00
..
AlienCake add an example using UI & states to create a game menu (#2960) 2022-01-14 19:09:42 +00:00
animated Add morph targets (#8158) 2023-06-22 20:00:01 +00:00
AnisotropyBarnLamp Implement PBR anisotropy per KHR_materials_anisotropy. (#13450) 2024-06-03 23:46:06 +00:00
barycentric Add support for custom glTF vertex attributes. (#5370) 2023-04-24 14:20:13 +00:00
CornellBox Implement lightmaps. (#10231) 2024-01-02 20:38:47 +00:00
cube Hot asset reloading 2020-05-16 20:18:30 -07:00
cubes Implement minimal reflection probes (fixed macOS, iOS, and Android). (#11366) 2024-01-19 07:33:52 +00:00
DepthOfFieldExample fix lava emissive strength in depth of field example (#13449) 2024-05-21 19:35:08 +00:00
extras add handling of all missing gltf extras: scene, mesh & materials (#13453) 2024-06-03 13:16:38 +00:00
FlightHelmet Asset system rework and GLTF scene loading (#693) 2020-10-18 13:48:15 -07:00
FlightHelmetLowPoly Implement visibility ranges, also known as hierarchical levels of detail (HLODs). (#12916) 2024-05-03 00:11:35 +00:00
GolfBall Implement clearcoat per the Filament and the KHR_materials_clearcoat specifications. (#13031) 2024-05-05 22:57:05 +00:00
IrradianceVolumeExample Implement irradiance volumes. (#10268) 2024-02-06 23:23:20 +00:00
ship Use a ship in Transform::align example (#13935) 2024-06-20 00:58:00 +00:00
SimpleSkin Mesh Skinning. Attempt #3 (#4238) 2022-03-29 18:31:13 +00:00
sphere Hot asset reloading 2020-05-16 20:18:30 -07:00
terrain Add Distance and Atmospheric Fog support (#6412) 2023-01-29 15:28:56 +00:00
TonemappingTest Implement filmic color grading. (#13121) 2024-05-02 12:18:59 +00:00
torus Remove monkey.gltf (#9974) 2023-09-30 02:50:31 +00:00
VolumetricFogExample Implement volumetric fog and volumetric lighting, also known as light shafts or god rays. (#13057) 2024-05-16 17:13:18 +00:00
Box0.bin organize examples and add ecs guide 2020-05-01 13:12:47 -07:00