Input replication (#62)

This commit is contained in:
PROMETHIA-27
2025-08-25 03:41:28 -04:00
committed by GitHub
parent c650924d68
commit 7f6c00b5d6
20 changed files with 345 additions and 280 deletions

View File

@@ -46,11 +46,9 @@ fn on_trigger_thrown(
let pos = state.pos;
let vel = if let Some(target) = state.target {
let t = query_transform
.get(target)
.expect("target must have transform");
let vel = if let Some(target) = state.target
&& let Ok(t) = query_transform.get(target)
{
launch_velocity(pos, t.translation, SPEED, 9.81)
.map(|(low, _)| low)
.unwrap()