Skip to content

Commit 431c71b

Browse files
committed
Maybe fix link to dimforge/nphysics#149
1 parent a0ff341 commit 431c71b

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Don't use. Work in progress. Many things are incomplete!
44

5-
TODO sheet from rustsim/nphysics#149
5+
TODO sheet from [this nphysics issue](rustsim/nphysics#149)
66

77
- [x] Be able to have something able to simulate one rigid body that falls under gravity. This excludes collision detection, constraint solver, etc.
88
- [ ] Add support for forces generators.

src/lib.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ impl <'a> System<'a> for Dumb3dPhysicsSystem {
248248
#[cfg(test)]
249249
mod tests {
250250
use amethyst::{GameData, StateData, SimpleState, GameDataBuilder, Application};
251-
use amethyst::assets::Handlee
251+
use amethyst::assets::Handle;
252252
use amethyst::prelude::Builder;
253253
use amethyst::renderer::*;
254254
use amethyst::core::Transform;
@@ -267,7 +267,7 @@ mod tests {
267267
// Create a texture for using.
268268
let texture = data.world.read_resource::<amethyst::assets::Loader>()
269269
.load_from_data::<Texture, ()>(
270-
[144.0, 144.0, 144.0, 0.5].into(),
270+
[170.0, 170.0, 255.0, 1.0].into(),
271271
(),
272272
&data.world.read_resource());
273273

@@ -277,11 +277,17 @@ mod tests {
277277
(resolution.width(), resolution.height())
278278
};
279279

280-
// Add Camera
281-
data.world.create_entity()
282-
.with(Camera::standard_3d(x, y))
283-
.with(Transform::from(Vector3::new(0.0, 0.0, -4.0)))
284-
.build();
280+
{
281+
let mut camera_transform = Transform::from(Vector3::new(0.0, 0.0, -4.0));
282+
283+
camera_transform.yaw_local(-3.142);
284+
285+
// Add Camera
286+
data.world.create_entity()
287+
.with(Camera::standard_3d(x, y))
288+
.with(camera_transform)
289+
.build();
290+
}
285291

286292
// Add Light
287293
data.world.add_resource(AmbientColor(Rgba::from([0.01; 3])));
@@ -299,6 +305,7 @@ mod tests {
299305
data.world.create_entity()
300306
.with(Shape::Sphere(32, 32).generate::<Vec<PosNormTex>>(None))
301307
.with(texture)
308+
.with(GlobalTransform::default())
302309
.build();
303310
}
304311
}

0 commit comments

Comments
 (0)