Fix faster diagonal acceleration for the player
All checks were successful
CI / Formatting (push) Successful in 1m27s
All checks were successful
CI / Formatting (push) Successful in 1m27s
Also always accelerate the player using the same force, so that bigger players aren't overpowered.
This commit is contained in:
parent
10b525e4c7
commit
0896ccf691
3 changed files with 41 additions and 18 deletions
|
@ -6,9 +6,13 @@ use bevy::prelude::*;
|
|||
#[require(Collider, Mesh2d, MeshMaterial2d<ColorMaterial>, Restitution = Restitution::new(1.0), RigidBody, TransformInterpolation, Transform)]
|
||||
struct GameObject;
|
||||
|
||||
/// Radius of a ball
|
||||
#[derive(Component, Default)]
|
||||
pub struct Radius(pub f32);
|
||||
|
||||
/// A basic ball with which to interact
|
||||
#[derive(Component, Default)]
|
||||
#[require(GameObject, RigidBody = RigidBody::Dynamic)]
|
||||
#[require(GameObject, RigidBody = RigidBody::Dynamic, Radius)]
|
||||
pub struct Ball;
|
||||
|
||||
/// The controllable ball
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue