mirror of
https://github.com/FyroxEngine/Fyrox.git
synced 2026-10-12 02:02:20 +00:00
Merge branch 'FyroxEngine:master' into tiles
This commit is contained in:
@@ -316,12 +316,13 @@ impl<T: EntityId> MachineLayer<T> {
|
||||
handle: self.active_state,
|
||||
name: state.name.clone(),
|
||||
},
|
||||
events: self.nodes[state.root].collect_animation_events(
|
||||
&self.nodes,
|
||||
params,
|
||||
animations,
|
||||
strategy,
|
||||
),
|
||||
events: self
|
||||
.nodes
|
||||
.try_borrow(state.root)
|
||||
.map(|root| {
|
||||
root.collect_animation_events(&self.nodes, params, animations, strategy)
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
};
|
||||
} else if let Some(transition) = self.transitions.try_borrow(self.active_transition) {
|
||||
if let (Some(source_state), Some(dest_state)) = (
|
||||
|
||||
@@ -1336,17 +1336,15 @@ impl PhysicsWorld {
|
||||
&self,
|
||||
collider: ColliderHandle,
|
||||
) -> impl Iterator<Item = IntersectionPair> + '_ {
|
||||
self.narrow_phase.intersection_pairs_with(collider).map(
|
||||
|(collider1, collider2, intersecting)| IntersectionPair {
|
||||
collider1: Handle::decode_from_u128(
|
||||
self.colliders.get(collider1).unwrap().user_data,
|
||||
),
|
||||
collider2: Handle::decode_from_u128(
|
||||
self.colliders.get(collider2).unwrap().user_data,
|
||||
),
|
||||
has_any_active_contact: intersecting,
|
||||
},
|
||||
)
|
||||
self.narrow_phase
|
||||
.intersection_pairs_with(collider)
|
||||
.filter_map(|(collider1, collider2, intersecting)| {
|
||||
Some(IntersectionPair {
|
||||
collider1: Handle::decode_from_u128(self.colliders.get(collider1)?.user_data),
|
||||
collider2: Handle::decode_from_u128(self.colliders.get(collider2)?.user_data),
|
||||
has_any_active_contact: intersecting,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/// Contacts checks between two regular colliders
|
||||
|
||||
@@ -1872,17 +1872,15 @@ impl PhysicsWorld {
|
||||
&self,
|
||||
collider: ColliderHandle,
|
||||
) -> impl Iterator<Item = IntersectionPair> + '_ {
|
||||
self.narrow_phase.intersection_pairs_with(collider).map(
|
||||
|(collider1, collider2, intersecting)| IntersectionPair {
|
||||
collider1: Handle::decode_from_u128(
|
||||
self.colliders.get(collider1).unwrap().user_data,
|
||||
),
|
||||
collider2: Handle::decode_from_u128(
|
||||
self.colliders.get(collider2).unwrap().user_data,
|
||||
),
|
||||
has_any_active_contact: intersecting,
|
||||
},
|
||||
)
|
||||
self.narrow_phase
|
||||
.intersection_pairs_with(collider)
|
||||
.filter_map(|(collider1, collider2, intersecting)| {
|
||||
Some(IntersectionPair {
|
||||
collider1: Handle::decode_from_u128(self.colliders.get(collider1)?.user_data),
|
||||
collider2: Handle::decode_from_u128(self.colliders.get(collider2)?.user_data),
|
||||
has_any_active_contact: intersecting,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/// Contacts checks between two regular colliders
|
||||
|
||||
Reference in New Issue
Block a user