Allow using polylines as a collider shape.
This commit is contained in:
@@ -26,6 +26,7 @@ use crate::objects::cone::Cone;
|
||||
#[cfg(feature = "dim3")]
|
||||
use crate::objects::cylinder::Cylinder;
|
||||
use crate::objects::mesh::Mesh;
|
||||
use crate::objects::polyline::Polyline;
|
||||
use rand::{Rng, SeedableRng};
|
||||
use rand_pcg::Pcg32;
|
||||
use std::collections::HashMap;
|
||||
@@ -352,6 +353,15 @@ impl GraphicsManager {
|
||||
)))
|
||||
}
|
||||
|
||||
if let Some(polyline) = shape.as_polyline() {
|
||||
out.push(Node::Polyline(Polyline::new(
|
||||
handle,
|
||||
polyline.vertices().to_vec(),
|
||||
polyline.indices().to_vec(),
|
||||
color,
|
||||
)))
|
||||
}
|
||||
|
||||
if let Some(heightfield) = shape.as_heightfield() {
|
||||
out.push(Node::HeightField(HeightField::new(
|
||||
handle,
|
||||
|
||||
Reference in New Issue
Block a user