Skip to content

Commit 2c8a309

Browse files
authored
Merge branch 'main' into collision-hooks
2 parents d718490 + 7e945ae commit 2c8a309

File tree

6 files changed

+5
-16
lines changed

6 files changed

+5
-16
lines changed

crates/avian_derive/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "avian_derive"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
edition = "2021"
55
license = "MIT OR Apache-2.0"
66
authors = ["Joona Aalto <[email protected]>"]

crates/avian_derive/src/lib.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,6 @@ pub fn derive_physics_layer(input: TokenStream) -> TokenStream {
123123
};
124124

125125
let expanded = quote! {
126-
#[cfg(feature = "2d")]
127-
use avian2d::prelude::PhysicsLayer;
128-
#[cfg(feature = "3d")]
129-
use avian3d::prelude::PhysicsLayer;
130-
131126
impl PhysicsLayer for #enum_ident {
132127
fn all_bits() -> u32 {
133128
#all_bits

src/collision/layers.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,6 @@ impl Default for CollisionLayers {
434434

435435
#[cfg(test)]
436436
mod tests {
437-
// Needed for `PhysicsLayer` derive macro
438-
#[cfg(feature = "2d")]
439-
use crate as avian2d;
440-
#[cfg(feature = "3d")]
441-
use crate as avian3d;
442-
443437
use crate::prelude::*;
444438

445439
#[derive(PhysicsLayer, Default)]

src/dynamics/solver/contact/tangent_part.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl ContactTangentPart {
139139
// This is needed for solving the two tangent directions simultaneously.
140140
// TODO. Derive and explain the math for this, or consider an alternative approach,
141141
// like using the Jacobians to compute the actual effective mass matrix.
142-
part.effective_inverse_mass[2] = 2.0 * (i1_rt11.dot(i1_rt21) + i2_rt12.dot(i2_rt22));
142+
part.effective_inverse_mass[2] = 2.0 * (rt11.dot(i1_rt21) + rt12.dot(i2_rt22));
143143
}
144144

145145
part

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ pub struct PhysicsPlugins {
699699
impl PhysicsPlugins {
700700
/// Creates a [`PhysicsPlugins`] plugin group using the given schedule for running the [`PhysicsSchedule`].
701701
///
702-
/// The default schedule is [`FixedPostUpdate`].
702+
/// The default schedule is `FixedPostUpdate`.
703703
pub fn new(schedule: impl ScheduleLabel) -> Self {
704704
Self {
705705
schedule: schedule.intern(),

src/sync/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub struct SyncPlugin {
4040
impl SyncPlugin {
4141
/// Creates a [`SyncPlugin`] with the schedule that is used for running the [`PhysicsSchedule`].
4242
///
43-
/// The default schedule is `PostUpdate`.
43+
/// The default schedule is `FixedPostUpdate`.
4444
pub fn new(schedule: impl ScheduleLabel) -> Self {
4545
Self {
4646
schedule: schedule.intern(),
@@ -50,7 +50,7 @@ impl SyncPlugin {
5050

5151
impl Default for SyncPlugin {
5252
fn default() -> Self {
53-
Self::new(PostUpdate)
53+
Self::new(FixedPostUpdate)
5454
}
5555
}
5656

0 commit comments

Comments
 (0)