void OffsetPlayerController(Vector3 offset) { groundMotor.ClearActivePlatform(); acrobatMotor.AdjustFallStart(offset.y); playerMotor.transform.position += offset; StreamingWorld.OffsetWorldCompensation(offset, true); }
void FixedUpdate() { // Must have streaming world reference if (!StreamingWorld) { return; } // Do nothing during streaming world init if (StreamingWorld.IsInit) { return; } if (CheckPosition()) { Vector3 change = GetOffset(player.transform.position); _totalOffset += change; _lastOffset = change; // Offset streaming world OffsetChildren(StreamingWorld.gameObject, change); StreamingWorld.OffsetWorldCompensation(change); // Update last position RaiseOnPositionUpdateEvent(change); //##trigger position update } }
void OffsetPlayerController(Vector3 offset) { playerMotor.ClearActivePlatform(); playerMotor.transform.position += offset; StreamingWorld.OffsetWorldCompensation(offset, true); }