Improve physics
This commit is contained in:
parent
8b87b68dae
commit
ec0b700313
14 changed files with 181 additions and 71 deletions
9
shared/src/commands/types/step.ts
Normal file
9
shared/src/commands/types/step.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import { Command } from '../command';
|
||||
|
||||
export class StepCommand extends Command {
|
||||
public static readonly type = 'StepCommand';
|
||||
|
||||
public constructor(public readonly deltaTimeInMiliseconds: DOMHighResTimeStamp) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ export * from './commands/types/create-objects';
|
|||
export * from './commands/types/create-player';
|
||||
export * from './commands/types/delete-objects';
|
||||
export * from './commands/types/update-objects';
|
||||
export * from './commands/types/step';
|
||||
export * from './commands/types/ternary-action';
|
||||
export * from './commands/types/move-action';
|
||||
export * from './commands/types/set-view-area-action';
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ export const settings = {
|
|||
hitDetectionCirclePointCount: 32,
|
||||
hitDetectionMaxOverlap: 0.01,
|
||||
physicsMaxStep: 5,
|
||||
gravitationalForce: vec2.fromValues(0, -0.015),
|
||||
gravitationalForce: vec2.fromValues(0, -0.005),
|
||||
maxVelocityX: 1.5,
|
||||
maxVelocityY: 8,
|
||||
velocityAttenuation: 0.99,
|
||||
maxVelocityY: 20,
|
||||
velocityAttenuation: 0.98,
|
||||
inViewAreaSize: 1920 * 1080 * 3,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue