Initial work on ledge & improved baking of root motion. (#90)
Reviewed-on: #90 Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #90.
This commit is contained in:
+16
-2
@@ -2,14 +2,14 @@ use bevy::{color::palettes::css::RED, prelude::*};
|
||||
|
||||
use crate::{
|
||||
match_loading::MatchConfig, math::{int::FGi32, vec3::FGVec3}, stage::{
|
||||
line::StageCollision,
|
||||
line::{StageCollision, StageLedgeSide},
|
||||
manifest::{StageManifest, StageManifestRegistry},
|
||||
},
|
||||
};
|
||||
|
||||
pub fn debug_draw_scene(mut gizmos: Gizmos, stage_collision: Res<StageCollision>) {
|
||||
for poly in stage_collision.stage_polys.iter() {
|
||||
for segment in poly.segments.iter() {
|
||||
for segment in &poly.segments {
|
||||
let from = segment.segment.point1().to_vec2();
|
||||
let to = segment.segment.point2().to_vec2();
|
||||
let from_3d = Vec3::new(from.x, from.y, 0.0);
|
||||
@@ -20,6 +20,20 @@ pub fn debug_draw_scene(mut gizmos: Gizmos, stage_collision: Res<StageCollision>
|
||||
gizmos.arrow(midpoint, midpoint + normal_3d, RED);
|
||||
}
|
||||
}
|
||||
|
||||
for ledge in &stage_collision.ledges {
|
||||
let position = ledge.position.to_vec2().extend(0.0);
|
||||
let direction = match ledge.hang_side {
|
||||
StageLedgeSide::Left => Vec3::NEG_X,
|
||||
StageLedgeSide::Right => Vec3::X,
|
||||
};
|
||||
gizmos.circle(position, 1.5, bevy::color::palettes::css::LIME);
|
||||
gizmos.arrow(
|
||||
position,
|
||||
position + direction * 4.0,
|
||||
bevy::color::palettes::css::LIME,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn debug_draw_blast_zones(
|
||||
|
||||
Reference in New Issue
Block a user