You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Parts/CharacterMovement.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ export class CharacterMovement extends Part {
16
16
this.type="CharacterMovement";
17
17
}
18
18
19
-
act(_delta: number): void{
19
+
act(delta: number): void{
20
20
if(!this.input){
21
21
if(!this.warned.has("MissingInput"))this.top?.warn(`CharacterMovement <${this.name}> (${this.id}) is missing an input property. Please create an input on the scene and pass it.`) ? this.warned.add("MissingInput") : null;
22
22
return;
@@ -26,7 +26,7 @@ export class CharacterMovement extends Part {
26
26
if(!transform){
27
27
return;
28
28
}
29
-
29
+
constspeed=this.speed*delta;
30
30
constkeys=this.input.downkeys;
31
31
letdx=0;
32
32
letdy=0;
@@ -66,7 +66,7 @@ export class CharacterMovement extends Part {
Copy file name to clipboardExpand all lines: engine/bundle.js
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11299,7 +11299,7 @@ class Layer extends Part {
11299
11299
this.type = "Layer";
11300
11300
this.id = generateUID();
11301
11301
this.debugEmoji = "\uD83D\uDDC2️";
11302
-
this.spatialGrid = new SpatialGrid(100);
11302
+
this.spatialGrid = new SpatialGrid(50);
11303
11303
}
11304
11304
addChild(part) {
11305
11305
part.setAll("layer", this);
@@ -13570,7 +13570,7 @@ class CharacterMovement extends Part {
13570
13570
this.input = input;
13571
13571
this.type = "CharacterMovement";
13572
13572
}
13573
-
act(_delta) {
13573
+
act(delta) {
13574
13574
if (!this.input) {
13575
13575
if (!this.warned.has("MissingInput"))
13576
13576
this.top?.warn(`CharacterMovement <${this.name}> (${this.id}) is missing an input property. Please create an input on the scene and pass it.`) && this.warned.add("MissingInput");
@@ -13580,6 +13580,7 @@ class CharacterMovement extends Part {
13580
13580
if (!transform) {
13581
13581
return;
13582
13582
}
13583
+
const speed = this.speed * delta;
13583
13584
const keys = this.input.downkeys;
13584
13585
let dx = 0;
13585
13586
let dy = 0;
@@ -13616,7 +13617,7 @@ class CharacterMovement extends Part {
13616
13617
dy *= Math.SQRT1_2;
13617
13618
}
13618
13619
if (dx !== 0 || dy !== 0) {
13619
-
transform.move(new Vector(dx * this.speed, dy * this.speed));
13620
+
transform.move(new Vector(dx * speed, dy * speed));
Copy file name to clipboardExpand all lines: engine/editor.js
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -24333,7 +24333,7 @@ Defaulting to 2020, but this will stop working in the future.`);
24333
24333
this.type = "Layer";
24334
24334
this.id = generateUID();
24335
24335
this.debugEmoji = "\uD83D\uDDC2️";
24336
-
this.spatialGrid = new SpatialGrid(100);
24336
+
this.spatialGrid = new SpatialGrid(50);
24337
24337
}
24338
24338
addChild(part) {
24339
24339
part.setAll("layer", this);
@@ -26484,7 +26484,7 @@ Defaulting to 2020, but this will stop working in the future.`);
26484
26484
this.input = input;
26485
26485
this.type = "CharacterMovement";
26486
26486
}
26487
-
act(_delta) {
26487
+
act(delta) {
26488
26488
if (!this.input) {
26489
26489
if (!this.warned.has("MissingInput"))
26490
26490
this.top?.warn(`CharacterMovement <${this.name}> (${this.id}) is missing an input property. Please create an input on the scene and pass it.`) && this.warned.add("MissingInput");
@@ -26494,6 +26494,7 @@ Defaulting to 2020, but this will stop working in the future.`);
26494
26494
if (!transform) {
26495
26495
return;
26496
26496
}
26497
+
const speed = this.speed * delta;
26497
26498
const keys = this.input.downkeys;
26498
26499
let dx = 0;
26499
26500
let dy = 0;
@@ -26530,7 +26531,7 @@ Defaulting to 2020, but this will stop working in the future.`);
26530
26531
dy *= Math.SQRT1_2;
26531
26532
}
26532
26533
if (dx !== 0 || dy !== 0) {
26533
-
transform.move(new Vector(dx * this.speed, dy * this.speed));
26534
+
transform.move(new Vector(dx * speed, dy * speed));
Copy file name to clipboardExpand all lines: testDist/TestColliderMerge.js
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -5929,7 +5929,7 @@ class Layer extends Part {
5929
5929
this.type = "Layer";
5930
5930
this.id = generateUID();
5931
5931
this.debugEmoji = "\uD83D\uDDC2️";
5932
-
this.spatialGrid = new SpatialGrid(100);
5932
+
this.spatialGrid = new SpatialGrid(50);
5933
5933
}
5934
5934
addChild(part) {
5935
5935
part.setAll("layer", this);
@@ -7624,7 +7624,7 @@ class CharacterMovement extends Part {
7624
7624
this.input = input;
7625
7625
this.type = "CharacterMovement";
7626
7626
}
7627
-
act(_delta) {
7627
+
act(delta) {
7628
7628
if (!this.input) {
7629
7629
if (!this.warned.has("MissingInput"))
7630
7630
this.top?.warn(`CharacterMovement <${this.name}> (${this.id}) is missing an input property. Please create an input on the scene and pass it.`) && this.warned.add("MissingInput");
@@ -7634,6 +7634,7 @@ class CharacterMovement extends Part {
7634
7634
if (!transform) {
7635
7635
return;
7636
7636
}
7637
+
const speed = this.speed * delta;
7637
7638
const keys = this.input.downkeys;
7638
7639
let dx = 0;
7639
7640
let dy = 0;
@@ -7670,7 +7671,7 @@ class CharacterMovement extends Part {
7670
7671
dy *= Math.SQRT1_2;
7671
7672
}
7672
7673
if (dx !== 0 || dy !== 0) {
7673
-
transform.move(new Vector(dx * this.speed, dy * this.speed));
7674
+
transform.move(new Vector(dx * speed, dy * speed));
0 commit comments