mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2024-12-28 00:19:27 +00:00
Create a proper fake sector for elevators
Also adjusted the loglift box shape to encompass the entire lift.
This commit is contained in:
parent
3ce50935c6
commit
2af563ceaa
@ -19,15 +19,16 @@ public class QSBElevator : WorldObject<Elevator>
|
||||
public override async UniTask Init(CancellationToken ct)
|
||||
{
|
||||
var boxShape = AttachedObject.gameObject.GetAddComponent<BoxShape>();
|
||||
boxShape.center = new Vector3(0, 1.75f, 0.25f);
|
||||
|
||||
if (Name == "LogLift")
|
||||
{
|
||||
boxShape.size = new Vector3(5, 3.5f, 8);
|
||||
boxShape.size = new Vector3(4.6f, 3.5f, 12);
|
||||
boxShape.center = new Vector3(0.1f, 1.75f, 1.3f);
|
||||
}
|
||||
else
|
||||
{
|
||||
boxShape.size = new Vector3(3, 3.5f, 3);
|
||||
boxShape.center = new Vector3(0, 1.75f, 0.25f);
|
||||
}
|
||||
|
||||
_elevatorTrigger = AttachedObject.gameObject.GetAddComponent<OWTriggerVolume>();
|
||||
|
@ -101,18 +101,9 @@ public class QSBSectorManager : WorldObjectManager
|
||||
// TH elevators
|
||||
foreach (var elevator in QSBWorldSync.GetUnityObjects<Elevator>())
|
||||
{
|
||||
// just create a sphere at the attach point lol
|
||||
// since players will be moved there when riding the elevator
|
||||
// --
|
||||
// The attach point on the game object itself to
|
||||
// sync player attachment properly.
|
||||
FakeSector.Create(elevator.gameObject,
|
||||
elevator.GetComponentInParent<Sector>(),
|
||||
x =>
|
||||
{
|
||||
x.gameObject.AddComponent<OWTriggerVolume>();
|
||||
x.gameObject.AddComponent<SphereShape>();
|
||||
});
|
||||
x => x._triggerRoot = elevator.gameObject);
|
||||
}
|
||||
|
||||
// rafts
|
||||
|
Loading…
Reference in New Issue
Block a user