Diff Drive works with prefab
This commit is contained in:
parent
0a9e11294a
commit
fba72b37f2
@ -7,6 +7,7 @@ namespace RoboidControl {
|
|||||||
readonly DifferentialDrive drive;
|
readonly DifferentialDrive drive;
|
||||||
readonly TouchSensor touchLeft;
|
readonly TouchSensor touchLeft;
|
||||||
readonly TouchSensor touchRight;
|
readonly TouchSensor touchRight;
|
||||||
|
const float speed = 0.5f;
|
||||||
|
|
||||||
public BB2B(Participant owner) : base(owner) {
|
public BB2B(Participant owner) : base(owner) {
|
||||||
this.name = "BB2B";
|
this.name = "BB2B";
|
||||||
@ -29,11 +30,11 @@ namespace RoboidControl {
|
|||||||
|
|
||||||
// The left wheel turns forward when nothing is touched on the right side
|
// The left wheel turns forward when nothing is touched on the right side
|
||||||
// and turn backward when the roboid hits something on the right
|
// and turn backward when the roboid hits something on the right
|
||||||
float leftWheelSpeed = touchRight.touchedSomething ? -0.1f : 0.1f;
|
float leftWheelSpeed = touchRight.touchedSomething ? -speed : speed;
|
||||||
|
|
||||||
// The right wheel does the same, but instead is controlled by
|
// The right wheel does the same, but instead is controlled by
|
||||||
// touches on the left side
|
// touches on the left side
|
||||||
float rightWheelSpeed = touchLeft.touchedSomething ? -0.1f : 0.1f;
|
float rightWheelSpeed = touchLeft.touchedSomething ? -speed : speed;
|
||||||
|
|
||||||
// When both sides are touching something, both wheels will turn backward
|
// When both sides are touching something, both wheels will turn backward
|
||||||
// and the roboid will move backwards
|
// and the roboid will move backwards
|
||||||
|
@ -6,6 +6,9 @@ namespace RoboidControl.Unity {
|
|||||||
|
|
||||||
public Wheel leftWheel;
|
public Wheel leftWheel;
|
||||||
public Wheel rightWheel;
|
public Wheel rightWheel;
|
||||||
|
public SphereCollider casterWheel;
|
||||||
|
|
||||||
|
protected RoboidControl.DifferentialDrive coreDrive => core as RoboidControl.DifferentialDrive;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create the Unity representation
|
/// Create the Unity representation
|
||||||
@ -13,65 +16,99 @@ namespace RoboidControl.Unity {
|
|||||||
/// <param name="core">The core touch sensor</param>
|
/// <param name="core">The core touch sensor</param>
|
||||||
/// <returns>The Unity representation of the touch sensor</returns>
|
/// <returns>The Unity representation of the touch sensor</returns>
|
||||||
public static DifferentialDrive Create(RoboidControl.DifferentialDrive core) {
|
public static DifferentialDrive Create(RoboidControl.DifferentialDrive core) {
|
||||||
|
DifferentialDrive component = null;
|
||||||
|
Rigidbody rb = null;
|
||||||
GameObject prefab = (GameObject)Resources.Load("DifferentialDrive");
|
GameObject prefab = (GameObject)Resources.Load("DifferentialDrive");
|
||||||
// if (prefab != null) {
|
if (prefab != null) {
|
||||||
// // Use resource prefab when available
|
// Use resource prefab when available
|
||||||
// GameObject gameObj = Instantiate(prefab);
|
GameObject gameObj = Instantiate(prefab);
|
||||||
// DifferentialDrive component = gameObj.GetComponent<DifferentialDrive>();
|
component = gameObj.GetComponent<DifferentialDrive>();
|
||||||
// if (component != null)
|
if (component != null)
|
||||||
// component.core = core;
|
component.core = core;
|
||||||
// return component;
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// Fallback implementation
|
|
||||||
GameObject gameObj = new(core.name);
|
|
||||||
DifferentialDrive component = gameObj.AddComponent<DifferentialDrive>();
|
|
||||||
component.Init(core);
|
|
||||||
|
|
||||||
Rigidbody rb = gameObj.AddComponent<Rigidbody>();
|
rb = component.GetComponent<Rigidbody>();
|
||||||
rb.isKinematic = false;
|
}
|
||||||
rb.mass = 0.5f;
|
else {
|
||||||
|
// Fallback implementation
|
||||||
|
GameObject gameObj = new(core.name);
|
||||||
|
component = gameObj.AddComponent<DifferentialDrive>();
|
||||||
|
component.Init(core);
|
||||||
|
|
||||||
|
rb = gameObj.AddComponent<Rigidbody>();
|
||||||
|
rb.isKinematic = false;
|
||||||
|
rb.mass = 0.5f;
|
||||||
|
}
|
||||||
return component;
|
return component;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
private Rigidbody rb = null;
|
||||||
|
|
||||||
|
protected virtual void Awake() {
|
||||||
|
rb = GetComponent<Rigidbody>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void HandleBinary() {
|
protected override void HandleBinary() {
|
||||||
Debug.Log("Diff drive handle Binary");
|
Debug.Log("Diff drive handle Binary");
|
||||||
RoboidControl.DifferentialDrive coreDrive = core as RoboidControl.DifferentialDrive;
|
|
||||||
RoboidControl.Unity.Wheel[] motors = null;
|
|
||||||
if (coreDrive.wheelRadius <= 0 || coreDrive.wheelSeparation <= 0)
|
if (coreDrive.wheelRadius <= 0 || coreDrive.wheelSeparation <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (leftWheel == null) {
|
// if (leftWheel == null) {
|
||||||
motors = GetComponentsInChildren<Wheel>();
|
// motors = GetComponentsInChildren<Wheel>();
|
||||||
foreach (var motor in motors) {
|
// foreach (var motor in motors) {
|
||||||
if (motor.core.id == coreDrive.leftWheel.id)
|
// if (motor.core.id == coreDrive.leftWheel.id)
|
||||||
leftWheel = motor;
|
// leftWheel = motor;
|
||||||
}
|
// }
|
||||||
if (leftWheel == null)
|
// if (leftWheel == null)
|
||||||
leftWheel = Wheel.Create(this.GetComponent<Rigidbody>(), coreDrive.leftWheel.id);
|
// // Create placeholder wheel
|
||||||
}
|
// leftWheel = Wheel.Create(this.GetComponent<Rigidbody>(), coreDrive.leftWheel.id);
|
||||||
|
// }
|
||||||
if (leftWheel != null) {
|
if (leftWheel != null) {
|
||||||
leftWheel.wheelCollider.radius = coreDrive.wheelRadius;
|
leftWheel.core ??= coreDrive.leftWheel;
|
||||||
leftWheel.wheelCollider.center = new Vector3(-coreDrive.wheelSeparation / 2, 0, 0);
|
SphereCollider leftWheelCollider = leftWheel.GetComponent<SphereCollider>();
|
||||||
leftWheel.transform.position = Vector3.zero; // position is done with the center, but only X direction is supported right now...
|
leftWheelCollider.radius = coreDrive.wheelRadius;
|
||||||
|
// leftWheelCollider.center = new Vector3(-coreDrive.wheelSeparation / 2, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rightWheel == null) {
|
// if (rightWheel == null) {
|
||||||
if (motors == null)
|
// if (motors == null)
|
||||||
motors = GetComponentsInChildren<Wheel>();
|
// motors = GetComponentsInChildren<Wheel>();
|
||||||
foreach (var motor in motors) {
|
// foreach (var motor in motors) {
|
||||||
if (motor.core.id == coreDrive.rightWheel.id)
|
// if (motor.core.id == coreDrive.rightWheel.id)
|
||||||
rightWheel = motor;
|
// rightWheel = motor;
|
||||||
}
|
// }
|
||||||
if (rightWheel == null)
|
// if (rightWheel == null)
|
||||||
rightWheel = Wheel.Create(this.GetComponent<Rigidbody>(), coreDrive.rightWheel.id);
|
// rightWheel = Wheel.Create(this.GetComponent<Rigidbody>(), coreDrive.rightWheel.id);
|
||||||
|
// }
|
||||||
|
if (rightWheel != null) {
|
||||||
|
rightWheel.core ??= coreDrive.rightWheel;
|
||||||
|
SphereCollider rightWheelCollider = rightWheel.GetComponent<SphereCollider>();
|
||||||
|
rightWheelCollider.radius = coreDrive.wheelRadius;
|
||||||
|
// rightWheelCollider.center = new Vector3(coreDrive.wheelSeparation / 2, 0, 0);
|
||||||
}
|
}
|
||||||
if (rightWheel != null && coreDrive.wheelRadius > 0 && coreDrive.wheelSeparation > 0) {
|
|
||||||
rightWheel.wheelCollider.radius = coreDrive.wheelRadius;
|
if (casterWheel == null) {
|
||||||
rightWheel.wheelCollider.center = new Vector3(coreDrive.wheelSeparation / 2, 0, 0);
|
// Create it
|
||||||
rightWheel.transform.position = Vector3.zero; // position is done with the center, but only X direction is supported right now...
|
|
||||||
}
|
}
|
||||||
|
if (casterWheel != null) {
|
||||||
|
casterWheel.radius = coreDrive.wheelRadius;
|
||||||
|
// Put it in the middle of the back
|
||||||
|
casterWheel.center = new Vector3(0, 0, -coreDrive.wheelSeparation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected override void FixedUpdate() {
|
||||||
|
base.FixedUpdate();
|
||||||
|
|
||||||
|
float leftWheelVelocity = leftWheel.rotationSpeed * (2 * Mathf.PI) * coreDrive.wheelRadius;
|
||||||
|
float rightWheelVelocity = rightWheel.rotationSpeed * (2 * Mathf.PI) * coreDrive.wheelRadius;
|
||||||
|
|
||||||
|
float forwardSpeed = (leftWheelVelocity + rightWheelVelocity) / 2f;
|
||||||
|
float turningSpeed = (leftWheelVelocity - rightWheelVelocity) / coreDrive.wheelSeparation;
|
||||||
|
|
||||||
|
// Use smoothing to emulate motor inertia
|
||||||
|
rb.velocity = 0.9f * rb.velocity + 0.1f * forwardSpeed * transform.forward;
|
||||||
|
rb.angularVelocity = 0.9f * rb.angularVelocity + 0.1f * turningSpeed * Vector3.up;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace RoboidControl.Unity {
|
namespace RoboidControl.Unity {
|
||||||
public class Motor : Thing {
|
public class Motor : Thing {
|
||||||
|
|
||||||
|
public float maxSpeed = 5;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create the Unity representation
|
/// Create the Unity representation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -34,15 +36,15 @@ namespace RoboidControl.Unity {
|
|||||||
|
|
||||||
protected override void HandleBinary() {
|
protected override void HandleBinary() {
|
||||||
RoboidControl.Motor coreMotor = core as RoboidControl.Motor;
|
RoboidControl.Motor coreMotor = core as RoboidControl.Motor;
|
||||||
this.rotationSpeed = coreMotor.targetSpeed;
|
this.rotationSpeed = coreMotor.targetSpeed * maxSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update() {
|
protected override void Update() {
|
||||||
base.Update();
|
base.Update();
|
||||||
// We rotate the first child of the motor, which should be the axle.
|
// We rotate the first child of the motor, which should be the axle.
|
||||||
if (this.transform.childCount > 0) {
|
float rotation = 360 * this.rotationSpeed * Time.deltaTime;
|
||||||
this.transform.GetChild(0).Rotate(360 * this.rotationSpeed, 0, 0);
|
if (this.transform.childCount > 0)
|
||||||
}
|
this.transform.GetChild(0).Rotate(rotation, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
744
Unity/Resources/DifferentialDrive 1.prefab
Normal file
744
Unity/Resources/DifferentialDrive 1.prefab
Normal file
@ -0,0 +1,744 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &135949056663158942
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 693610334404048217}
|
||||||
|
- component: {fileID: 874278397287993211}
|
||||||
|
- component: {fileID: 8149674613691108646}
|
||||||
|
- component: {fileID: 7453252590388621785}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Body
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &693610334404048217
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 135949056663158942}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0.01, z: -0.01}
|
||||||
|
m_LocalScale: {x: 0.15, y: 0.05, z: 0.2}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6798369561388671537}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &874278397287993211
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 135949056663158942}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &8149674613691108646
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 135949056663158942}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &7453252590388621785
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 135949056663158942}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: -3.4930155e-36, y: 0, z: 0}
|
||||||
|
--- !u!1 &461568911372928883
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6614469428499581915}
|
||||||
|
- component: {fileID: 5740668195873595670}
|
||||||
|
- component: {fileID: 981938778352350881}
|
||||||
|
- component: {fileID: 5978480396129778279}
|
||||||
|
- component: {fileID: 2485026999856066728}
|
||||||
|
- component: {fileID: 1286794448967865589}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Sphere
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &6614469428499581915
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 461568911372928883}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: -0, y: -0.0337, z: -0.0684}
|
||||||
|
m_LocalScale: {x: 0.02, y: 0.02, z: 0.02}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 213193100111257669}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &5740668195873595670
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 461568911372928883}
|
||||||
|
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &981938778352350881
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 461568911372928883}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!135 &5978480396129778279
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 461568911372928883}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 0.5
|
||||||
|
m_Center: {x: 2.2e-44, y: 0, z: 0}
|
||||||
|
--- !u!54 &2485026999856066728
|
||||||
|
Rigidbody:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 461568911372928883}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Mass: 0.01
|
||||||
|
m_Drag: 0
|
||||||
|
m_AngularDrag: 0
|
||||||
|
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||||
|
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||||
|
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ImplicitCom: 1
|
||||||
|
m_ImplicitTensor: 1
|
||||||
|
m_UseGravity: 1
|
||||||
|
m_IsKinematic: 0
|
||||||
|
m_Interpolate: 0
|
||||||
|
m_Constraints: 0
|
||||||
|
m_CollisionDetection: 0
|
||||||
|
--- !u!59 &1286794448967865589
|
||||||
|
HingeJoint:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 461568911372928883}
|
||||||
|
m_ConnectedBody: {fileID: 4118868690347991998}
|
||||||
|
m_ConnectedArticulationBody: {fileID: 0}
|
||||||
|
m_Anchor: {x: 0, y: 0.5, z: 0}
|
||||||
|
m_Axis: {x: 1, y: 0, z: 0}
|
||||||
|
m_AutoConfigureConnectedAnchor: 1
|
||||||
|
m_ConnectedAnchor: {x: 0, y: -0.019776002, z: -0.0684}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_UseSpring: 0
|
||||||
|
m_Spring:
|
||||||
|
spring: 0
|
||||||
|
damper: 0
|
||||||
|
targetPosition: 0
|
||||||
|
m_UseMotor: 0
|
||||||
|
m_Motor:
|
||||||
|
targetVelocity: 0
|
||||||
|
force: 0
|
||||||
|
freeSpin: 0
|
||||||
|
m_UseLimits: 0
|
||||||
|
m_ExtendedLimits: 0
|
||||||
|
m_UseAcceleration: 0
|
||||||
|
m_Limits:
|
||||||
|
min: 0
|
||||||
|
max: 0
|
||||||
|
bounciness: 0
|
||||||
|
bounceMinVelocity: 0.2
|
||||||
|
contactDistance: 0
|
||||||
|
m_BreakForce: Infinity
|
||||||
|
m_BreakTorque: Infinity
|
||||||
|
m_EnableCollision: 0
|
||||||
|
m_EnablePreprocessing: 1
|
||||||
|
m_MassScale: 1
|
||||||
|
m_ConnectedMassScale: 1
|
||||||
|
--- !u!1 &3154420579555598162
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 213193100111257669}
|
||||||
|
- component: {fileID: 7200410571604616845}
|
||||||
|
- component: {fileID: 894333789048616995}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Caster wheel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &213193100111257669
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3154420579555598162}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: 7e-45, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0.0039239973, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 6614469428499581915}
|
||||||
|
m_Father: {fileID: 6798369561388671537}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!146 &7200410571604616845
|
||||||
|
WheelCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3154420579555598162}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Center: {x: 0, y: 0, z: -0.1}
|
||||||
|
m_Radius: 0.1
|
||||||
|
m_SuspensionSpring:
|
||||||
|
spring: 0
|
||||||
|
damper: 0
|
||||||
|
targetPosition: 0.5
|
||||||
|
m_SuspensionDistance: 0.01
|
||||||
|
m_ForceAppPointDistance: 0
|
||||||
|
m_Mass: 0.1
|
||||||
|
m_WheelDampingRate: 0.25
|
||||||
|
m_ForwardFriction:
|
||||||
|
m_ExtremumSlip: 0.01
|
||||||
|
m_ExtremumValue: 0.01
|
||||||
|
m_AsymptoteSlip: 1
|
||||||
|
m_AsymptoteValue: 0.01
|
||||||
|
m_Stiffness: 0.01
|
||||||
|
m_SidewaysFriction:
|
||||||
|
m_ExtremumSlip: 0.01
|
||||||
|
m_ExtremumValue: 0.01
|
||||||
|
m_AsymptoteSlip: 1
|
||||||
|
m_AsymptoteValue: 0.01
|
||||||
|
m_Stiffness: 0.01
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_Enabled: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
--- !u!135 &894333789048616995
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3154420579555598162}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 0.1
|
||||||
|
m_Center: {x: 0, y: 0, z: -0.1}
|
||||||
|
--- !u!1 &3377575892836316963
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7997617267105515189}
|
||||||
|
- component: {fileID: 3291281099104606017}
|
||||||
|
- component: {fileID: 6773972788910618332}
|
||||||
|
- component: {fileID: 3720747953092717687}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Left wheel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &7997617267105515189
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3377575892836316963}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0.003924, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6798369561388671537}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!146 &3291281099104606017
|
||||||
|
WheelCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3377575892836316963}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Center: {x: -0.1, y: 0, z: 0}
|
||||||
|
m_Radius: 0.1
|
||||||
|
m_SuspensionSpring:
|
||||||
|
spring: 0
|
||||||
|
damper: 0
|
||||||
|
targetPosition: 0.5
|
||||||
|
m_SuspensionDistance: 0.01
|
||||||
|
m_ForceAppPointDistance: 0
|
||||||
|
m_Mass: 0.1
|
||||||
|
m_WheelDampingRate: 0.25
|
||||||
|
m_ForwardFriction:
|
||||||
|
m_ExtremumSlip: 0.4
|
||||||
|
m_ExtremumValue: 1
|
||||||
|
m_AsymptoteSlip: 0.8
|
||||||
|
m_AsymptoteValue: 0.5
|
||||||
|
m_Stiffness: 1
|
||||||
|
m_SidewaysFriction:
|
||||||
|
m_ExtremumSlip: 0.2
|
||||||
|
m_ExtremumValue: 1
|
||||||
|
m_AsymptoteSlip: 0.5
|
||||||
|
m_AsymptoteValue: 0.75
|
||||||
|
m_Stiffness: 1
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_Enabled: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
--- !u!114 &6773972788910618332
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3377575892836316963}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: ddd5065d5e866894cbcb569c3a898ccb, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
participant: {fileID: 0}
|
||||||
|
rotationSpeed: 0
|
||||||
|
wheelCollider: {fileID: 3291281099104606017}
|
||||||
|
--- !u!135 &3720747953092717687
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3377575892836316963}
|
||||||
|
m_Material: {fileID: 13400000, guid: 6311a2373d42743449d6eb1130ee618a, type: 2}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 0.1
|
||||||
|
m_Center: {x: -0.1, y: 0, z: 0}
|
||||||
|
--- !u!1 &4326386140118987503
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6798369561388671537}
|
||||||
|
- component: {fileID: 2975045340952151157}
|
||||||
|
- component: {fileID: 4118868690347991998}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: DifferentialDrive 1
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6798369561388671537
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4326386140118987503}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 1.276433e-21, y: -1.082074e-19, z: -2.3980766e-36, w: 1}
|
||||||
|
m_LocalPosition: {x: 2.1932227e-37, y: -0.06941543, z: -1.3084181e-19}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 7997617267105515189}
|
||||||
|
- {fileID: 2660791421672615984}
|
||||||
|
- {fileID: 693610334404048217}
|
||||||
|
- {fileID: 213193100111257669}
|
||||||
|
- {fileID: 4266196581235677096}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &2975045340952151157
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4326386140118987503}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5c80bc2fd1d8aa14facb1ad4b6ccf7b3, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
participant: {fileID: 0}
|
||||||
|
leftWheel: {fileID: 6773972788910618332}
|
||||||
|
rightWheel: {fileID: 7425139233737877139}
|
||||||
|
casterWheel: {fileID: 894333789048616995}
|
||||||
|
--- !u!54 &4118868690347991998
|
||||||
|
Rigidbody:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4326386140118987503}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Mass: 0.1
|
||||||
|
m_Drag: 0
|
||||||
|
m_AngularDrag: 0.05
|
||||||
|
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||||
|
m_InertiaTensor: {x: 1, y: 1, z: 1}
|
||||||
|
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ImplicitCom: 1
|
||||||
|
m_ImplicitTensor: 1
|
||||||
|
m_UseGravity: 1
|
||||||
|
m_IsKinematic: 0
|
||||||
|
m_Interpolate: 0
|
||||||
|
m_Constraints: 0
|
||||||
|
m_CollisionDetection: 0
|
||||||
|
--- !u!1 &5122915782100933114
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2660791421672615984}
|
||||||
|
- component: {fileID: 5992237647142430322}
|
||||||
|
- component: {fileID: 7425139233737877139}
|
||||||
|
- component: {fileID: 8150853676422519226}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Right wheel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &2660791421672615984
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5122915782100933114}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0.003924, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6798369561388671537}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!146 &5992237647142430322
|
||||||
|
WheelCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5122915782100933114}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Center: {x: 0.1, y: 0, z: 0}
|
||||||
|
m_Radius: 0.1
|
||||||
|
m_SuspensionSpring:
|
||||||
|
spring: 0
|
||||||
|
damper: 0
|
||||||
|
targetPosition: 0.5
|
||||||
|
m_SuspensionDistance: 0.01
|
||||||
|
m_ForceAppPointDistance: 0
|
||||||
|
m_Mass: 0.1
|
||||||
|
m_WheelDampingRate: 0.25
|
||||||
|
m_ForwardFriction:
|
||||||
|
m_ExtremumSlip: 0.4
|
||||||
|
m_ExtremumValue: 1
|
||||||
|
m_AsymptoteSlip: 0.8
|
||||||
|
m_AsymptoteValue: 0.5
|
||||||
|
m_Stiffness: 1
|
||||||
|
m_SidewaysFriction:
|
||||||
|
m_ExtremumSlip: 0.2
|
||||||
|
m_ExtremumValue: 1
|
||||||
|
m_AsymptoteSlip: 0.5
|
||||||
|
m_AsymptoteValue: 0.75
|
||||||
|
m_Stiffness: 1
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_Enabled: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
--- !u!114 &7425139233737877139
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5122915782100933114}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: ddd5065d5e866894cbcb569c3a898ccb, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
participant: {fileID: 0}
|
||||||
|
rotationSpeed: 0
|
||||||
|
wheelCollider: {fileID: 5992237647142430322}
|
||||||
|
--- !u!135 &8150853676422519226
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5122915782100933114}
|
||||||
|
m_Material: {fileID: 13400000, guid: 6311a2373d42743449d6eb1130ee618a, type: 2}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 0.1
|
||||||
|
m_Center: {x: 0.1, y: 0, z: 0}
|
||||||
|
--- !u!1 &9198376257167485667
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4266196581235677096}
|
||||||
|
- component: {fileID: 3529432273103841021}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Front Caster wheel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 0
|
||||||
|
--- !u!4 &4266196581235677096
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9198376257167485667}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: 7e-45, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0.0039239973, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6798369561388671537}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!146 &3529432273103841021
|
||||||
|
WheelCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 9198376257167485667}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Center: {x: 0, y: 0, z: 0.1}
|
||||||
|
m_Radius: 0.1
|
||||||
|
m_SuspensionSpring:
|
||||||
|
spring: 100
|
||||||
|
damper: 10
|
||||||
|
targetPosition: 0.5
|
||||||
|
m_SuspensionDistance: 0.01
|
||||||
|
m_ForceAppPointDistance: 0
|
||||||
|
m_Mass: 0.1
|
||||||
|
m_WheelDampingRate: 0.25
|
||||||
|
m_ForwardFriction:
|
||||||
|
m_ExtremumSlip: 0.01
|
||||||
|
m_ExtremumValue: 0.01
|
||||||
|
m_AsymptoteSlip: 1
|
||||||
|
m_AsymptoteValue: 0.01
|
||||||
|
m_Stiffness: 0.01
|
||||||
|
m_SidewaysFriction:
|
||||||
|
m_ExtremumSlip: 0.01
|
||||||
|
m_ExtremumValue: 0.01
|
||||||
|
m_AsymptoteSlip: 1
|
||||||
|
m_AsymptoteValue: 0.01
|
||||||
|
m_Stiffness: 0.01
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_Enabled: 0
|
||||||
|
m_ProvidesContacts: 0
|
@ -11,6 +11,7 @@ GameObject:
|
|||||||
- component: {fileID: 693610334404048217}
|
- component: {fileID: 693610334404048217}
|
||||||
- component: {fileID: 874278397287993211}
|
- component: {fileID: 874278397287993211}
|
||||||
- component: {fileID: 8149674613691108646}
|
- component: {fileID: 8149674613691108646}
|
||||||
|
- component: {fileID: 7453252590388621785}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Body
|
m_Name: Body
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -27,8 +28,8 @@ Transform:
|
|||||||
m_GameObject: {fileID: 135949056663158942}
|
m_GameObject: {fileID: 135949056663158942}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0.01, z: -0.01}
|
||||||
m_LocalScale: {x: 0.15, y: 0.05, z: 0.2}
|
m_LocalScale: {x: 0.12, y: 0.05, z: 0.2}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 6798369561388671537}
|
m_Father: {fileID: 6798369561388671537}
|
||||||
@ -83,6 +84,80 @@ MeshRenderer:
|
|||||||
m_SortingLayer: 0
|
m_SortingLayer: 0
|
||||||
m_SortingOrder: 0
|
m_SortingOrder: 0
|
||||||
m_AdditionalVertexStreams: {fileID: 0}
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
--- !u!65 &7453252590388621785
|
||||||
|
BoxCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 135949056663158942}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 0
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Size: {x: 1, y: 1, z: 1}
|
||||||
|
m_Center: {x: -3.4930155e-36, y: 0, z: 0}
|
||||||
|
--- !u!1 &3154420579555598162
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 213193100111257669}
|
||||||
|
- component: {fileID: 894333789048616995}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Caster wheel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &213193100111257669
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3154420579555598162}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: 7e-45, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: -0.1}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6798369561388671537}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!135 &894333789048616995
|
||||||
|
SphereCollider:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3154420579555598162}
|
||||||
|
m_Material: {fileID: 13400000, guid: 6311a2373d42743449d6eb1130ee618a, type: 2}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 0.00001
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &3377575892836316963
|
--- !u!1 &3377575892836316963
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -92,7 +167,8 @@ GameObject:
|
|||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 7997617267105515189}
|
- component: {fileID: 7997617267105515189}
|
||||||
- component: {fileID: 3291281099104606017}
|
- component: {fileID: 6773972788910618332}
|
||||||
|
- component: {fileID: 3720747953092717687}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Left wheel
|
m_Name: Left wheel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -109,42 +185,36 @@ Transform:
|
|||||||
m_GameObject: {fileID: 3377575892836316963}
|
m_GameObject: {fileID: 3377575892836316963}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0.003924, z: 0}
|
m_LocalPosition: {x: -0.08, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 9144497505704104684}
|
||||||
m_Father: {fileID: 6798369561388671537}
|
m_Father: {fileID: 6798369561388671537}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!146 &3291281099104606017
|
--- !u!114 &6773972788910618332
|
||||||
WheelCollider:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 3377575892836316963}
|
m_GameObject: {fileID: 3377575892836316963}
|
||||||
serializedVersion: 2
|
m_Enabled: 1
|
||||||
m_Center: {x: -0.1, y: 0, z: 0}
|
m_EditorHideFlags: 0
|
||||||
m_Radius: 0.1
|
m_Script: {fileID: 11500000, guid: ddd5065d5e866894cbcb569c3a898ccb, type: 3}
|
||||||
m_SuspensionSpring:
|
m_Name:
|
||||||
spring: 100
|
m_EditorClassIdentifier:
|
||||||
damper: 10
|
participant: {fileID: 0}
|
||||||
targetPosition: 0.5
|
maxSpeed: 5
|
||||||
m_SuspensionDistance: 0.01
|
rotationSpeed: 0
|
||||||
m_ForceAppPointDistance: 0
|
--- !u!135 &3720747953092717687
|
||||||
m_Mass: 0.1
|
SphereCollider:
|
||||||
m_WheelDampingRate: 0.25
|
m_ObjectHideFlags: 0
|
||||||
m_ForwardFriction:
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_ExtremumSlip: 0.4
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_ExtremumValue: 1
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_AsymptoteSlip: 0.8
|
m_GameObject: {fileID: 3377575892836316963}
|
||||||
m_AsymptoteValue: 0.5
|
m_Material: {fileID: 13400000, guid: 6311a2373d42743449d6eb1130ee618a, type: 2}
|
||||||
m_Stiffness: 1
|
|
||||||
m_SidewaysFriction:
|
|
||||||
m_ExtremumSlip: 0.2
|
|
||||||
m_ExtremumValue: 1
|
|
||||||
m_AsymptoteSlip: 0.5
|
|
||||||
m_AsymptoteValue: 0.75
|
|
||||||
m_Stiffness: 1
|
|
||||||
m_IncludeLayers:
|
m_IncludeLayers:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 0
|
m_Bits: 0
|
||||||
@ -152,8 +222,12 @@ WheelCollider:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 0
|
m_Bits: 0
|
||||||
m_LayerOverridePriority: 0
|
m_LayerOverridePriority: 0
|
||||||
m_Enabled: 1
|
m_IsTrigger: 0
|
||||||
m_ProvidesContacts: 0
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 0.00001
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &4326386140118987503
|
--- !u!1 &4326386140118987503
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -188,6 +262,7 @@ Transform:
|
|||||||
- {fileID: 7997617267105515189}
|
- {fileID: 7997617267105515189}
|
||||||
- {fileID: 2660791421672615984}
|
- {fileID: 2660791421672615984}
|
||||||
- {fileID: 693610334404048217}
|
- {fileID: 693610334404048217}
|
||||||
|
- {fileID: 213193100111257669}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &2975045340952151157
|
--- !u!114 &2975045340952151157
|
||||||
@ -202,19 +277,10 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 5c80bc2fd1d8aa14facb1ad4b6ccf7b3, type: 3}
|
m_Script: {fileID: 11500000, guid: 5c80bc2fd1d8aa14facb1ad4b6ccf7b3, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
<core>k__BackingField:
|
|
||||||
terminate: 0
|
|
||||||
id: 1
|
|
||||||
type: 13
|
|
||||||
nameChanged: 1
|
|
||||||
hierarchyChanged: 1
|
|
||||||
positionUpdated: 0
|
|
||||||
orientationUpdated: 0
|
|
||||||
linearVelocityUpdated: 0
|
|
||||||
angularVelocityUpdated: 0
|
|
||||||
participant: {fileID: 0}
|
participant: {fileID: 0}
|
||||||
leftWheel: {fileID: 3291281099104606017}
|
leftWheel: {fileID: 6773972788910618332}
|
||||||
rightWheel: {fileID: 5992237647142430322}
|
rightWheel: {fileID: 7425139233737877139}
|
||||||
|
casterWheel: {fileID: 894333789048616995}
|
||||||
--- !u!54 &4118868690347991998
|
--- !u!54 &4118868690347991998
|
||||||
Rigidbody:
|
Rigidbody:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -223,7 +289,7 @@ Rigidbody:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 4326386140118987503}
|
m_GameObject: {fileID: 4326386140118987503}
|
||||||
serializedVersion: 4
|
serializedVersion: 4
|
||||||
m_Mass: 0.5
|
m_Mass: 0.1
|
||||||
m_Drag: 0
|
m_Drag: 0
|
||||||
m_AngularDrag: 0.05
|
m_AngularDrag: 0.05
|
||||||
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
m_CenterOfMass: {x: 0, y: 0, z: 0}
|
||||||
@ -242,6 +308,89 @@ Rigidbody:
|
|||||||
m_Interpolate: 0
|
m_Interpolate: 0
|
||||||
m_Constraints: 0
|
m_Constraints: 0
|
||||||
m_CollisionDetection: 0
|
m_CollisionDetection: 0
|
||||||
|
--- !u!1 &4927629757198460283
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 9144497505704104684}
|
||||||
|
- component: {fileID: 8353236605004633556}
|
||||||
|
- component: {fileID: 1652944855748388758}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Cube
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &9144497505704104684
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4927629757198460283}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.01, y: 0.05, z: 0.05}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 7997617267105515189}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &8353236605004633556
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4927629757198460283}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &1652944855748388758
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4927629757198460283}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: c83c86eecb501964d9e4fd4074683016, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
--- !u!1 &5122915782100933114
|
--- !u!1 &5122915782100933114
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -251,7 +400,8 @@ GameObject:
|
|||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 2660791421672615984}
|
- component: {fileID: 2660791421672615984}
|
||||||
- component: {fileID: 5992237647142430322}
|
- component: {fileID: 7425139233737877139}
|
||||||
|
- component: {fileID: 8150853676422519226}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Right wheel
|
m_Name: Right wheel
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -268,42 +418,36 @@ Transform:
|
|||||||
m_GameObject: {fileID: 5122915782100933114}
|
m_GameObject: {fileID: 5122915782100933114}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0.003924, z: 0}
|
m_LocalPosition: {x: 0.08, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children:
|
||||||
|
- {fileID: 2324127387642107303}
|
||||||
m_Father: {fileID: 6798369561388671537}
|
m_Father: {fileID: 6798369561388671537}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!146 &5992237647142430322
|
--- !u!114 &7425139233737877139
|
||||||
WheelCollider:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 5122915782100933114}
|
m_GameObject: {fileID: 5122915782100933114}
|
||||||
serializedVersion: 2
|
m_Enabled: 1
|
||||||
m_Center: {x: 0.1, y: 0, z: 0}
|
m_EditorHideFlags: 0
|
||||||
m_Radius: 0.1
|
m_Script: {fileID: 11500000, guid: ddd5065d5e866894cbcb569c3a898ccb, type: 3}
|
||||||
m_SuspensionSpring:
|
m_Name:
|
||||||
spring: 100
|
m_EditorClassIdentifier:
|
||||||
damper: 10
|
participant: {fileID: 0}
|
||||||
targetPosition: 0.5
|
maxSpeed: 5
|
||||||
m_SuspensionDistance: 0.01
|
rotationSpeed: 0
|
||||||
m_ForceAppPointDistance: 0
|
--- !u!135 &8150853676422519226
|
||||||
m_Mass: 0.1
|
SphereCollider:
|
||||||
m_WheelDampingRate: 0.25
|
m_ObjectHideFlags: 0
|
||||||
m_ForwardFriction:
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_ExtremumSlip: 0.4
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_ExtremumValue: 1
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_AsymptoteSlip: 0.8
|
m_GameObject: {fileID: 5122915782100933114}
|
||||||
m_AsymptoteValue: 0.5
|
m_Material: {fileID: 13400000, guid: 6311a2373d42743449d6eb1130ee618a, type: 2}
|
||||||
m_Stiffness: 1
|
|
||||||
m_SidewaysFriction:
|
|
||||||
m_ExtremumSlip: 0.2
|
|
||||||
m_ExtremumValue: 1
|
|
||||||
m_AsymptoteSlip: 0.5
|
|
||||||
m_AsymptoteValue: 0.75
|
|
||||||
m_Stiffness: 1
|
|
||||||
m_IncludeLayers:
|
m_IncludeLayers:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 0
|
m_Bits: 0
|
||||||
@ -311,5 +455,92 @@ WheelCollider:
|
|||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 0
|
m_Bits: 0
|
||||||
m_LayerOverridePriority: 0
|
m_LayerOverridePriority: 0
|
||||||
m_Enabled: 1
|
m_IsTrigger: 0
|
||||||
m_ProvidesContacts: 0
|
m_ProvidesContacts: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Radius: 0.00001
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &5663058822615269368
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2324127387642107303}
|
||||||
|
- component: {fileID: 7927909525546489266}
|
||||||
|
- component: {fileID: 1038362976985791207}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Cube
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &2324127387642107303
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5663058822615269368}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: 7e-45, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.01, y: 0.049999997, z: 0.049999997}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 2660791421672615984}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!33 &7927909525546489266
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5663058822615269368}
|
||||||
|
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!23 &1038362976985791207
|
||||||
|
MeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5663058822615269368}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_StaticShadowCaster: 0
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 2
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: c83c86eecb501964d9e4fd4074683016, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
m_IgnoreNormalsForChartDetection: 0
|
||||||
|
m_ImportantGI: 0
|
||||||
|
m_StitchLightmapSeams: 1
|
||||||
|
m_SelectedEditorRenderState: 3
|
||||||
|
m_MinimumChartSize: 4
|
||||||
|
m_AutoUVMaxDistance: 0.5
|
||||||
|
m_AutoUVMaxAngle: 89
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingLayer: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_AdditionalVertexStreams: {fileID: 0}
|
||||||
|
@ -13,7 +13,7 @@ namespace RoboidControl.Unity {
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The core C# thing
|
/// The core C# thing
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[field: SerializeField]
|
//[field: SerializeField]
|
||||||
public RoboidControl.Thing core { get; set; }
|
public RoboidControl.Thing core { get; set; }
|
||||||
|
|
||||||
public SiteServer participant;
|
public SiteServer participant;
|
||||||
@ -65,7 +65,8 @@ namespace RoboidControl.Unity {
|
|||||||
/// Update the Unity representation
|
/// Update the Unity representation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected virtual void Update() {
|
protected virtual void Update() {
|
||||||
UpdateThing();
|
if (core == null)
|
||||||
|
return;
|
||||||
|
|
||||||
if (core.linearVelocity != null && core.linearVelocity.distance != 0) {
|
if (core.linearVelocity != null && core.linearVelocity.distance != 0) {
|
||||||
Vector3 direction = Quaternion.AngleAxis(core.linearVelocity.direction.horizontal, Vector3.up) * Vector3.forward;
|
Vector3 direction = Quaternion.AngleAxis(core.linearVelocity.direction.horizontal, Vector3.up) * Vector3.forward;
|
||||||
@ -78,9 +79,13 @@ namespace RoboidControl.Unity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected virtual void FixedUpdate() {
|
||||||
|
UpdateThing();
|
||||||
|
}
|
||||||
|
|
||||||
public void UpdateThing() {
|
public void UpdateThing() {
|
||||||
if (core == null) {
|
if (core == null) {
|
||||||
// Debug.Log("Core thing is gone, self destruct in 0 seconds...");
|
Debug.Log($"{this} core thing is gone, self destruct in 0 seconds...");
|
||||||
Destroy(this);
|
Destroy(this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -23,14 +23,14 @@ namespace RoboidControl.Unity {
|
|||||||
GameObject gameObj = new(core.name);
|
GameObject gameObj = new(core.name);
|
||||||
Wheel component = gameObj.AddComponent<Wheel>();
|
Wheel component = gameObj.AddComponent<Wheel>();
|
||||||
component.Init(core);
|
component.Init(core);
|
||||||
component.wheelCollider = gameObj.AddComponent<WheelCollider>();
|
// component.wheelCollider = gameObj.AddComponent<WheelCollider>();
|
||||||
component.wheelCollider.mass = 0.1f;
|
// component.wheelCollider.mass = 0.1f;
|
||||||
component.wheelCollider.suspensionDistance = 0.01f;
|
// component.wheelCollider.suspensionDistance = 0.01f;
|
||||||
component.wheelCollider.suspensionSpring = new JointSpring {
|
// component.wheelCollider.suspensionSpring = new JointSpring {
|
||||||
spring = 100f, // Very high spring value to make it rigid
|
// spring = 100f, // Very high spring value to make it rigid
|
||||||
damper = 10f, // Low damping (could be adjusted for slight 'bounciness')
|
// damper = 10f, // Low damping (could be adjusted for slight 'bounciness')
|
||||||
targetPosition = 0.5f // Neutral position (middle of the suspension travel)
|
// targetPosition = 0.5f // Neutral position (middle of the suspension travel)
|
||||||
};
|
// };
|
||||||
Debug.Log("Create " + core.name);
|
Debug.Log("Create " + core.name);
|
||||||
return component;
|
return component;
|
||||||
}
|
}
|
||||||
@ -58,39 +58,19 @@ namespace RoboidControl.Unity {
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
component.Init(core);
|
component.Init(core);
|
||||||
component.wheelCollider = gameObj.AddComponent<WheelCollider>();
|
// component.wheelCollider = gameObj.AddComponent<WheelCollider>();
|
||||||
component.wheelCollider.mass = 0.1f;
|
// component.wheelCollider.mass = 0.1f;
|
||||||
component.wheelCollider.suspensionDistance = 0.01f;
|
// component.wheelCollider.suspensionDistance = 0.01f;
|
||||||
component.wheelCollider.suspensionSpring = new JointSpring {
|
// component.wheelCollider.suspensionSpring = new JointSpring {
|
||||||
spring = 100f, // Very high spring value to make it rigid
|
// spring = 100f, // Very high spring value to make it rigid
|
||||||
damper = 10f, // Low damping (could be adjusted for slight 'bounciness')
|
// damper = 10f, // Low damping (could be adjusted for slight 'bounciness')
|
||||||
targetPosition = 0.5f // Neutral position (middle of the suspension travel)
|
// targetPosition = 0.5f // Neutral position (middle of the suspension travel)
|
||||||
};
|
// };
|
||||||
Debug.Log("Create placeholder Wheel ");
|
Debug.Log("Create placeholder Wheel ");
|
||||||
return component;
|
return component;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public WheelCollider wheelCollider;
|
|
||||||
|
|
||||||
protected override void HandlePose() {
|
|
||||||
this.wheelCollider.center = core.position.ToVector3();
|
|
||||||
this.transform.position = Vector3.zero; // position is done with the center
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Update() {
|
|
||||||
UpdateThing();
|
|
||||||
|
|
||||||
if (wheelCollider.radius > 0) {
|
|
||||||
float targetRotationSpeed = this.rotationSpeed * 2 * Mathf.PI; // 1 rotation per second in radians
|
|
||||||
|
|
||||||
// Calculate the required motor torque
|
|
||||||
float requiredTorque = (targetRotationSpeed * wheelCollider.mass) / wheelCollider.radius;
|
|
||||||
|
|
||||||
// Set the motor torque
|
|
||||||
wheelCollider.motorTorque = requiredTorque;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
Loading…
x
Reference in New Issue
Block a user