working on guts and player fpp model
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using RebootKit.Engine;
|
||||
using RebootKit.Engine.Foundation;
|
||||
using RebootKit.Engine.Main;
|
||||
using RebootKit.Engine.Services.Input;
|
||||
using Unity.Mathematics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.Serialization;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
namespace RealityReboot.jelycho.Player {
|
||||
namespace RebootReality.jelycho.Player {
|
||||
public class PlayerController : IController {
|
||||
readonly Config m_Config;
|
||||
PlayerActor m_FPPActor;
|
||||
@@ -31,6 +28,10 @@ namespace RealityReboot.jelycho.Player {
|
||||
m_FPPActor = await RR.World.SpawnActor<PlayerActor>(m_Config.playerActorPrefab, cancellationToken);
|
||||
m_FPPActor.Simulate = true;
|
||||
|
||||
if (RR.World.Context is WorldContext worldContext) {
|
||||
m_FPPActor.WarpTo(worldContext.PlayerSpawnPoint.position);
|
||||
}
|
||||
|
||||
await Awaitable.NextFrameAsync(cancellationToken);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user