hytopia 0.1.63 → 0.1.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -180,7 +180,13 @@ function startBlockSpawner(world: World) {
180
180
 
181
181
  blockEntity.onTick = () => {
182
182
  if (blockEntity.isSpawned && blockEntity.position.z > GAME_BLOCK_DESPAWN_Z) {
183
- // TODO: drop it out of the world, despawn to fix platform collision bug
183
+ // Make it "fall" out of the world for a nice effect and prevent
184
+ // player collision platforming sensors from not getting their off
185
+ // event triggered because of despawning before uncontact.
186
+ blockEntity.setLinearVelocity({ x: 0, y: -5, z: 0 });
187
+ }
188
+
189
+ if (blockEntity.isSpawned && blockEntity.position.y < -5) {
184
190
  blockEntity.despawn();
185
191
  }
186
192
  };
@@ -260,8 +266,6 @@ function onPlayerJoin(world: World, player: Player) {
260
266
  modelScale: 0.5,
261
267
  });
262
268
 
263
- (playerEntity.controller as PlayerEntityController).sticksToPlatforms = false;
264
-
265
269
  playerEntity.onTick = () => {
266
270
  if (playerEntity.position.y < -3) {
267
271
  // Assume the player has fallen off the map in the game
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.1.63",
3
+ "version": "0.1.64",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "main": "server.js",
6
6
  "bin": {