Fix ball spawn order
This commit is contained in:
parent
72c74bbedb
commit
55d6d236f9
@ -153,13 +153,13 @@ impl Map {
|
||||
{
|
||||
let mut ball = ball_prefab.instantiate_as::<Ball>();
|
||||
ball.bind_mut().dropper = player_id;
|
||||
self.base_mut().add_child(&ball);
|
||||
if let Some(transform) = transform {
|
||||
ball.set_position(transform.location.into());
|
||||
ball.set_rotation(transform.rotation.into());
|
||||
} else {
|
||||
ball.set_position(ball_spawner.get_position());
|
||||
}
|
||||
self.base_mut().add_child(&ball);
|
||||
if let Some(velocity) = velocity {
|
||||
ball.set_linear_velocity(velocity.into());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user