Created a method to retrieve the SharedShape from a collider
In my case this is for creating a compound shape from a set of existing colliders
This commit is contained in:
@@ -244,6 +244,11 @@ impl Collider {
|
||||
self.shape = shape;
|
||||
}
|
||||
|
||||
/// Retrieve the SharedShape. Also see the `shape()` function
|
||||
pub fn shared_shape(&self) -> &SharedShape {
|
||||
&self.shape
|
||||
}
|
||||
|
||||
/// Compute the axis-aligned bounding box of this collider.
|
||||
pub fn compute_aabb(&self) -> AABB {
|
||||
self.shape.compute_aabb(&self.position)
|
||||
|
||||
Reference in New Issue
Block a user