浏览代码

Beginning project code cleanup for physics

/dots-physics
Mike Geig 5 年前
当前提交
26bf9dd2
共有 44 个文件被更改,包括 205 次插入162 次删除
  1. 136
      Assets/Unity Physics Items/Physics Scene.unity
  2. 2
      Assets/Unity Physics Items/BuoyantObject_DOTS.cs
  3. 1
      Assets/Unity Physics Items/Systems/GertsnerSystem.cs
  4. 2
      Assets/Unity Physics Items/Prefabs/Slippery.asset
  5. 2
      Assets/Unity Physics Items/Systems/PhysicsConversionSystem.cs
  6. 16
      Assets/Unity Physics Items/Systems/ApplyBuoyancyForceSystem.cs
  7. 2
      Assets/Unity Physics Items/Components/BoatDataComponents.cs.meta
  8. 9
      Assets/Unity Physics Items/Systems/DriveSystem.cs
  9. 8
      Assets/Unity Physics Items/Components.meta
  10. 8
      Assets/Unity Physics Items/Prefabs.meta
  11. 8
      Assets/Unity Physics Items/Systems.meta
  12. 16
      Assets/Unity Physics Items/Components/BoatBodyComponent.cs
  13. 33
      Assets/Unity Physics Items/Components/BoatDataComponents.cs
  14. 13
      Assets/Unity Physics Items/BoatBodyComponent.cs
  15. 25
      Assets/Unity Physics Items/BuoyantData.cs
  16. 11
      Assets/Unity Physics Items/BuoyantData.cs.meta
  17. 11
      Assets/Unity Physics Items/PhysicalVoxelBouyData.cs
  18. 11
      Assets/Unity Physics Items/PhysicalVoxelBouyData.cs.meta
  19. 18
      Assets/Unity Physics Items/BoatDriveSystem.cs
  20. 9
      Assets/Unity Physics Items/DrivingData.cs
  21. 11
      Assets/Unity Physics Items/DrivingData.cs.meta
  22. 4
      Assets/Unity Physics Items/MoveWithInputTag.cs
  23. 11
      Assets/Unity Physics Items/MoveWithInputTag.cs.meta
  24. 0
      /Assets/Unity Physics Items/BuoyantObject_DOTS.cs.meta
  25. 0
      /Assets/Unity Physics Items/BuoyantObject_DOTS.cs
  26. 0
      /Assets/Unity Physics Items/Components/BoatBodyComponent.cs.meta
  27. 0
      /Assets/Unity Physics Items/Prefabs/BoatEntity.prefab
  28. 0
      /Assets/Unity Physics Items/Prefabs/BoatEntity.prefab.meta
  29. 0
      /Assets/Unity Physics Items/Prefabs/Physics Settings.prefab
  30. 0
      /Assets/Unity Physics Items/Prefabs/Physics Settings.prefab.meta
  31. 0
      /Assets/Unity Physics Items/Systems/ApplyBuoyancyForceSystem.cs.meta
  32. 0
      /Assets/Unity Physics Items/Systems/GertsnerSystem.cs
  33. 0
      /Assets/Unity Physics Items/Systems/GertsnerSystem.cs.meta
  34. 0
      /Assets/Unity Physics Items/Prefabs/Slippery.asset
  35. 0
      /Assets/Unity Physics Items/Prefabs/Slippery.asset.meta
  36. 0
      /Assets/Unity Physics Items/Systems/PhysicsConversionSystem.cs
  37. 0
      /Assets/Unity Physics Items/Systems/PhysicsConversionSystem.cs.meta
  38. 0
      /Assets/Unity Physics Items/Systems/ApplyBuoyancyForceSystem.cs
  39. 0
      /Assets/Unity Physics Items/Components/BoatDataComponents.cs.meta
  40. 0
      /Assets/Unity Physics Items/Systems/DriveSystem.cs
  41. 0
      /Assets/Unity Physics Items/Systems/DriveSystem.cs.meta

136
Assets/Unity Physics Items/Physics Scene.unity


m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 2
mNoiseOffsets: {x: -474.2769, y: -564.23755, z: -459.04745}

m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 0}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 1
mNoiseOffsets: {x: 527.5414, y: 670.016, z: 973.20294}

objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 074aa8ca109924e18baf19f3e26665b6, type: 3}
propertyPath: m_LocalPosition.x
value: -93.75
value: -100
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 074aa8ca109924e18baf19f3e26665b6, type: 3}
propertyPath: m_LocalPosition.y

m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 0}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 1
mNoiseOffsets: {x: -853.6284, y: 18.267273, z: -816.24817}

m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 11400000, guid: 46965f9cbaf525742a6da4c2172a99cd, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 1
mNoiseOffsets: {x: -539.1776, y: -314.93887, z: 367.37033}

y: 0
width: 1
height: 1
near clip plane: 0.2
far clip plane: 400
field of view: 45
near clip plane: 0.25
far clip plane: 350
field of view: 80
orthographic: 0
orthographic size: 10
m_Depth: -5

m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1017609894}
m_LocalRotation: {x: 0.3049827, y: -0.6440706, z: 0.6279532, w: 0.31278342}
m_LocalPosition: {x: -94.89, y: 29.81, z: -4.25}
m_LocalRotation: {x: 0.09853762, y: -0.000000004280661, z: 4.2386913e-10, w: 0.99513334}
m_LocalPosition: {x: -101.99, y: 3.56, z: -8.78}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 208737146}

m_ShowCameraFrustum: 0
m_IgnoreTimeScale: 0
m_WorldUpOverride: {fileID: 0}
m_UpdateMethod: 2
m_VcamUpdateMethod: 2
m_BrainUpdateMethod: 1
m_DefaultBlend:
m_Style: 0
m_Time: 2

m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 0}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 1
mNoiseOffsets: {x: -87.575806, y: 286.0324, z: -690.78894}

objectReference: {fileID: 0}
- target: {fileID: 1553288845585282, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 3}
propertyPath: m_IsActive
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 4534809148113994, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 3}
propertyPath: m_LocalPosition.x

propertyPath: voxels.Array.data[57].z
value: -2.0381937
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.09853762
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.y
value: -0.000000030436922
objectReference: {fileID: 0}
- target: {fileID: 2901399632790975270, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_LocalRotation.z
value: 0.00000026457639
objectReference: {fileID: 0}
- target: {fileID: 3138619813684846845, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_Layer
value: 11
objectReference: {fileID: 0}
- target: {fileID: 8128372730392016786, guid: fc3ffb83d6eafb1489a5b23bc82d25b6,
type: 3}
propertyPath: m_Layer
value: 11
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: fc3ffb83d6eafb1489a5b23bc82d25b6, type: 3}
--- !u!1 &1531988074 stripped

density: 483.749
volume: 6.6150007
voxelResolution: 0.3
centerOfMass: {x: 0, y: -0.35, z: -0.8}
centerOfMass: {x: 0, y: -0.25, z: -0.55}
voxels:
- {x: -0.9000001, y: 0.18077579, z: -2.0381937}
- {x: -0.9000001, y: 0.18077579, z: -1.7381936}

m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 0}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 0.1
m_FrequencyGain: 2
mNoiseOffsets: {x: 0, y: 0, z: 0}

m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 0}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 0.1
m_FrequencyGain: 2
mNoiseOffsets: {x: 0, y: 0, z: 0}

m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 11400000, guid: 8608ec81ee27a15488d33f9dad239e91, type: 2}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 0.2
m_FrequencyGain: 1
mNoiseOffsets: {x: -402.15027, y: -818.2488, z: 723.7754}

m_Name:
m_EditorClassIdentifier:
m_NoiseProfile: {fileID: 0}
m_PivotOffset: {x: 0, y: 0, z: 0}
m_AmplitudeGain: 1
m_FrequencyGain: 1
mNoiseOffsets: {x: 11.288513, y: 304.5282, z: -512.1067}

m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2061336191}
m_LocalRotation: {x: 0.3049827, y: -0.6440706, z: 0.6279532, w: 0.31278342}
m_LocalPosition: {x: -94.89, y: 29.81, z: -4.25}
m_LocalPosition: {x: -100.9, y: 21.59, z: -4.25}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1873663219}

- target: {fileID: 3457973740146875417, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}
propertyPath: m_LocalPosition.x
value: -104.07
value: -101.99
value: -0.389
value: 1.56
objectReference: {fileID: 0}
- target: {fileID: 3457973740146875417, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}

- target: {fileID: 3344001027717145451, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}
propertyPath: PrimaryColor.r
value: 0.63503486
value: 0.62488365
value: 0.38134143
value: 0.62488365
value: 0.063503504
value: 0.62488365
value: 0.36496514
value: 0.30937046
value: 0.21991628
value: 0.037511643
value: 0.038192913
value: 0.37511635
objectReference: {fileID: 0}
- target: {fileID: 3344550060052829039, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}

objectReference: {fileID: 0}
- target: {fileID: 1531988075, guid: 0a308b87c1579fb4c9ea256406209ca5, type: 3}
propertyPath: ConversionMode
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3453465595108755947, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 558137786967539335, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}

- target: {fileID: 558137786967539335, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}
propertyPath: m_LocalRotation.y
value: -4.322462e-18
value: -0.000000004280661
value: 2.3503325e-17
value: 4.2386913e-10
objectReference: {fileID: 0}
- target: {fileID: 3457579857442016301, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 320792261470743900, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}
propertyPath: m_Layer
value: 11
objectReference: {fileID: 0}
- target: {fileID: 6859253972866480691, guid: 0a308b87c1579fb4c9ea256406209ca5,
type: 3}
propertyPath: m_Layer
value: 11
- {fileID: 3457973739838196059, guid: 0a308b87c1579fb4c9ea256406209ca5, type: 3}
- {fileID: 3457973739838196059, guid: 0a308b87c1579fb4c9ea256406209ca5, type: 3}
- {fileID: 2092507922, guid: 0a308b87c1579fb4c9ea256406209ca5, type: 3}
- {fileID: 2092507921, guid: 0a308b87c1579fb4c9ea256406209ca5, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: 0a308b87c1579fb4c9ea256406209ca5, type: 3}
--- !u!82 &3457973741408294003 stripped
AudioSource:

- target: {fileID: 4018593011617785703, guid: ebb958ca9e119be438b62f3cce1981fc,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1925807081182823211, guid: ebb958ca9e119be438b62f3cce1981fc,
type: 3}
propertyPath: SimulationType
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1925807081182823211, guid: ebb958ca9e119be438b62f3cce1981fc,
type: 3}
propertyPath: Gravity.y
value: -9.81
objectReference: {fileID: 0}
- target: {fileID: 4712718218339362870, guid: ebb958ca9e119be438b62f3cce1981fc,
type: 3}
propertyPath: DrawBroadphase
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []

type: 3}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6589000189081194493, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6589000189185335907, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6589000188946292777, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6589000189286923512, guid: e70416e3bc35d4004a9981d0ac102ba5,
type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: e70416e3bc35d4004a9981d0ac102ba5, type: 3}

2
Assets/Unity Physics Items/BuoyantObject_DOTS.cs


namespace WaterSystem
{
public class BuoyantObject2 : MonoBehaviour//, IConvertGameObjectToEntity
public class BuoyantObject_DOTS : MonoBehaviour//, IConvertGameObjectToEntity
{
public BuoyancyType _buoyancyType; // type of buoyancy to calculate
public float density; // density of the object, this is calculated off it's volume and mass

1
Assets/Unity Physics Items/Systems/GertsnerSystem.cs


waveNorm += (norm * waveCountMulti) * amplitude;
}
}
heights[vi] = new VoxelHeight{Value = wavePos};
if (offsets.Length == 1)

2
Assets/Unity Physics Items/Prefabs/Slippery.asset


m_RaisesCollisionEvents:
m_Override: 1
m_Value: 0
m_CustomFlags:
m_CustomTags:
m_Override: 1
m_Value: 0000000000000000

2
Assets/Unity Physics Items/Systems/PhysicsConversionSystem.cs


// Update is called once per frame
protected override void OnUpdate()
{
Entities.ForEach((BuoyantObject2 behaviour) => { behaviour.Convert(GetPrimaryEntity(behaviour), DstEntityManager, this); });
Entities.ForEach((BuoyantObject_DOTS behaviour) => { behaviour.Convert(GetPrimaryEntity(behaviour), DstEntityManager, this); });
}
}
}

16
Assets/Unity Physics Items/Systems/ApplyBuoyancyForceSystem.cs


using Unity.Mathematics;
using Unity.Transforms;
using UnityEngine;
using static WaterSystem.BuoyantObject2;
using static WaterSystem.BuoyantObject_DOTS;
using Unity.Physics.Extensions;
using Unity.Physics.Systems;
using Unity.Physics;

[ReadOnly]
public BufferFromEntity<VoxelHeight> heightBuffer;
public void Execute(Entity entity, int index, ref Translation pos, ref Rotation rot, ref PhysicsVelocity vel, ref PhysicsMass mass, ref PhysicsDamping damping, ref BuoyantData data)
{
DynamicBuffer<VoxelOffset> offsets = offsetBuffer[entity];

//Debug.Log("new pass: " + entity.ToString());
var entityTransform = new RigidTransform(rot.Value, pos.Value);
float avgHeight = 0;
int total = 0;
var entityTransform = new RigidTransform(rot.Value, pos.Value);
if (wp.y - data.voxelResolution < waterLevel)
{
//float depth = waterLevel - wp.y + (data.voxelResolution * 2f);

var force = localDampingForce + math.sqrt(subFactor) * data.localArchimedesForce;//\
ComponentExtensions.ApplyImpulse(ref vel, mass, pos, rot, force * dt, wp);
//entity.ApplyImpulse(force, wp);//RB.AddForceAtPosition(force, wp);
avgHeight += force.y;
total++;
Debug.Log("Average height: " + avgHeight / total);
//submergedAmount /= offsets.Length;
//damping.Linear = Mathf.Lerp(data.baseDrag, 1f, submergedAmount);
//damping.Angular = Mathf.Lerp(data.baseAngularDrag, 1f, submergedAmount);

2
Assets/Unity Physics Items/Components/BoatDataComponents.cs.meta


fileFormatVersion: 2
guid: 1c6f1509c9123b744893eac97a7388fa
guid: 5cd1fa5899494974698ae65f8dd12273
MonoImporter:
externalObjects: {}
serializedVersion: 2

9
Assets/Unity Physics Items/Systems/DriveSystem.cs


var force = (forward * throttle * data.horsePower) / mass.InverseMass; //divide by iMass to counteract mass in impulse method
var torque = (throttle * new float3(-1, 0, 0)) / mass.InverseInertia;
float3 up = math.mul(rot.Value, math.up());
ComponentExtensions.ApplyAngularImpulse(ref vel, mass, torque * dt);
ComponentExtensions.ApplyLinearImpulse(ref vel, mass, up * 20000f * dt);
//ComponentExtensions.ApplyAngularImpulse(ref vel, mass, torque * dt);
//Turning
steering = Mathf.Clamp(steering, -1f, 1f); // clamp for reasonable values
//Turning
steering = Mathf.Clamp(steering, -1f, 1f); // clamp for reasonable values
var sTorque = new float3(0f, data.torque, -data.torque * .5f) * steering / mass.InverseInertia;
ComponentExtensions.ApplyAngularImpulse(ref vel, mass, sTorque * dt);
//Debug.Log(string.Format("Force: {0}, Torque: {1} Throttle: {2}", force, sTorque, throttle));

8
Assets/Unity Physics Items/Components.meta


fileFormatVersion: 2
guid: abe8179f462907947a719dde0391f6dc
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Unity Physics Items/Prefabs.meta


fileFormatVersion: 2
guid: a9875aaa1f03515488c4e37f55db9618
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
Assets/Unity Physics Items/Systems.meta


fileFormatVersion: 2
guid: 71f78570d6fb8c74a92c6e06b82f20e6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

16
Assets/Unity Physics Items/Components/BoatBodyComponent.cs


using System.Collections;
using System.Collections.Generic;
using Unity.Entities;
using Unity.Transforms;
using UnityEngine;
public class BoatBodyComponent : MonoBehaviour, IConvertGameObjectToEntity
{
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
dstManager.AddComponent(entity, typeof(CopyTransformToGameObject));
}
}

33
Assets/Unity Physics Items/Components/BoatDataComponents.cs


using Unity.Entities;
using Unity.Mathematics;
using static WaterSystem.BuoyantObject_DOTS;
public struct BuoyantData : IComponentData
{
public BuoyancyType type;
public float voxelResolution;
public float3 normal;
public float3 localArchimedesForce;
public float percentSubmerged;
public float baseDrag;
public float baseAngularDrag;
}
public struct VoxelOffset : IBufferElementData
{
public float3 Value;
}
public struct VoxelHeight : IBufferElementData
{
public float3 Value;
}
public struct DrivingData : IComponentData
{
public float torque;
public float horsePower;
public float3 engineOffset;
}
public struct MoveWithInputTag : IComponentData
{ }

13
Assets/Unity Physics Items/BoatBodyComponent.cs


using System.Collections;
using System.Collections.Generic;
using Unity.Entities;
using Unity.Transforms;
using UnityEngine;
public class BoatBodyComponent : MonoBehaviour, IConvertGameObjectToEntity
{
public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
{
dstManager.AddComponent(entity, typeof(CopyTransformToGameObject));
}
}

25
Assets/Unity Physics Items/BuoyantData.cs


using Unity.Entities;
using Unity.Mathematics;
using static WaterSystem.BuoyantObject2;
public struct BuoyantData : IComponentData
{
public BuoyancyType type;
public float voxelResolution;
public float3 normal;
public float3 localArchimedesForce;
public float percentSubmerged;
public float baseDrag;
public float baseAngularDrag;
}
//you can't have two buffers of the same type on an entity, so you need a new struct for each float3 you want to map.
public struct VoxelOffset : IBufferElementData
{
public float3 Value;
}
public struct VoxelHeight : IBufferElementData
{
public float3 Value;
}
//Now, your query needs to check for BuoyantData, VoxelOffset and VoxelHeight
//Your component itself doesn't define the behaviour, your query does. And your query probably will have several components in it.

11
Assets/Unity Physics Items/BuoyantData.cs.meta


fileFormatVersion: 2
guid: 95cc8733bdb37db469f6827e5a105e06
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

11
Assets/Unity Physics Items/PhysicalVoxelBouyData.cs


using System.Collections;
using System.Collections.Generic;
using Unity.Entities;
using Unity.Mathematics;
using UnityEngine;
public struct PhysicalVoxelBouyData : IComponentData
{
public int guid;
}

11
Assets/Unity Physics Items/PhysicalVoxelBouyData.cs.meta


fileFormatVersion: 2
guid: d371b62cbe5cfcc4e96917db6453b791
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

18
Assets/Unity Physics Items/BoatDriveSystem.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BoatDriveSystem : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

9
Assets/Unity Physics Items/DrivingData.cs


using Unity.Entities;
using Unity.Mathematics;
public struct DrivingData : IComponentData
{
public float torque;
public float horsePower;
public float3 engineOffset;
}

11
Assets/Unity Physics Items/DrivingData.cs.meta


fileFormatVersion: 2
guid: eecb437b456d8484fb05784f0109d7b3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

4
Assets/Unity Physics Items/MoveWithInputTag.cs


using Unity.Entities;
public struct MoveWithInputTag : IComponentData
{}

11
Assets/Unity Physics Items/MoveWithInputTag.cs.meta


fileFormatVersion: 2
guid: 6de2728723685584083eab3960a2daac
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

/Assets/Unity Physics Items/BuoyantObject2.cs.meta → /Assets/Unity Physics Items/BuoyantObject_DOTS.cs.meta

/Assets/Unity Physics Items/BuoyantObject2.cs → /Assets/Unity Physics Items/BuoyantObject_DOTS.cs

/Assets/Unity Physics Items/BoatBodyComponent.cs.meta → /Assets/Unity Physics Items/Components/BoatBodyComponent.cs.meta

/Assets/Unity Physics Items/BoatEntity.prefab → /Assets/Unity Physics Items/Prefabs/BoatEntity.prefab

/Assets/Unity Physics Items/BoatEntity.prefab.meta → /Assets/Unity Physics Items/Prefabs/BoatEntity.prefab.meta

/Assets/Unity Physics Items/Physics Settings.prefab → /Assets/Unity Physics Items/Prefabs/Physics Settings.prefab

/Assets/Unity Physics Items/Physics Settings.prefab.meta → /Assets/Unity Physics Items/Prefabs/Physics Settings.prefab.meta

/Assets/Unity Physics Items/ApplyBuoyancyForceSystem.cs.meta → /Assets/Unity Physics Items/Systems/ApplyBuoyancyForceSystem.cs.meta

/Assets/Unity Physics Items/GertsnerSystem.cs → /Assets/Unity Physics Items/Systems/GertsnerSystem.cs

/Assets/Unity Physics Items/GertsnerSystem.cs.meta → /Assets/Unity Physics Items/Systems/GertsnerSystem.cs.meta

/Assets/Unity Physics Items/Slippery.asset → /Assets/Unity Physics Items/Prefabs/Slippery.asset

/Assets/Unity Physics Items/Slippery.asset.meta → /Assets/Unity Physics Items/Prefabs/Slippery.asset.meta

/Assets/Unity Physics Items/PhysicsConversionSystem.cs → /Assets/Unity Physics Items/Systems/PhysicsConversionSystem.cs

/Assets/Unity Physics Items/PhysicsConversionSystem.cs.meta → /Assets/Unity Physics Items/Systems/PhysicsConversionSystem.cs.meta

/Assets/Unity Physics Items/ApplyBuoyancyForceSystem.cs → /Assets/Unity Physics Items/Systems/ApplyBuoyancyForceSystem.cs

/Assets/Unity Physics Items/BoatDriveSystem.cs.meta → /Assets/Unity Physics Items/Components/BoatDataComponents.cs.meta

/Assets/Unity Physics Items/DriveSystem.cs → /Assets/Unity Physics Items/Systems/DriveSystem.cs

/Assets/Unity Physics Items/DriveSystem.cs.meta → /Assets/Unity Physics Items/Systems/DriveSystem.cs.meta

正在加载...
取消
保存