Update to 6000.0.18f1 (3699cf869f9b)
This commit is contained in:
Родитель
8858425cfe
Коммит
714f4d24c7
|
@ -15,7 +15,7 @@ public class DynamicGravity : MonoBehaviour
|
|||
void FixedUpdate()
|
||||
{
|
||||
// Calculate our direction relative to the global gravity.
|
||||
var direction = Vector2.Dot(m_Rigidbody.velocity, Physics2D.gravity);
|
||||
var direction = Vector2.Dot(m_Rigidbody.linearVelocity, Physics2D.gravity);
|
||||
|
||||
// Set the gravity scale accordingly.
|
||||
m_Rigidbody.gravityScale = direction > 0f ? FallGravityScale : AgainstGravityScale;
|
||||
|
|
|
@ -15,7 +15,7 @@ public class InitialVelocity : MonoBehaviour
|
|||
// Set the initial velocities if the rigidbody was found.
|
||||
if (rigidbody)
|
||||
{
|
||||
rigidbody.velocity = m_Velocity;
|
||||
rigidbody.linearVelocity = m_Velocity;
|
||||
rigidbody.angularVelocity = m_AngularVelocity;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,10 +29,10 @@ public class ShowSpeedVelocityRotation : MonoBehaviour
|
|||
|
||||
string text = string.Empty;
|
||||
if (m_ShowSpeed)
|
||||
text += "Speed = " + m_Body.velocity.magnitude.ToString ("n2") + "\n";
|
||||
text += "Speed = " + m_Body.linearVelocity.magnitude.ToString ("n2") + "\n";
|
||||
|
||||
if (m_ShowVelocity)
|
||||
text += "LinVel = " + m_Body.velocity.ToString ("n2") + "\n";
|
||||
text += "LinVel = " + m_Body.linearVelocity.ToString ("n2") + "\n";
|
||||
|
||||
if (m_ShowRotation)
|
||||
text += "AngVel = " + m_Body.angularVelocity.ToString ("n2");
|
||||
|
|
|
@ -14,7 +14,7 @@ public class Rigidbody2D_QuadraticDrag : MonoBehaviour
|
|||
void FixedUpdate()
|
||||
{
|
||||
// Fetch the body velocity.
|
||||
var velocity = Body.velocity;
|
||||
var velocity = Body.linearVelocity;
|
||||
|
||||
// Calculate the body speed.
|
||||
var speed = velocity.magnitude;
|
||||
|
|
|
@ -14,7 +14,7 @@ public class Rigidbody2D_VelocityXY : MonoBehaviour
|
|||
|
||||
void FixedUpdate()
|
||||
{
|
||||
m_Rigidbody.velocityX = velocityX;
|
||||
m_Rigidbody.velocityY = velocityY;
|
||||
m_Rigidbody.linearVelocityX = velocityX;
|
||||
m_Rigidbody.linearVelocityY = velocityY;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class SimpleGroundedController : MonoBehaviour
|
|||
m_Rigidbody.AddForce(Vector2.up * JumpImpulse, ForceMode2D.Impulse);
|
||||
|
||||
// Set sideways velocity.
|
||||
m_Rigidbody.velocity = new Vector2(m_SideSpeed, m_Rigidbody.velocity.y);
|
||||
m_Rigidbody.linearVelocity = new Vector2(m_SideSpeed, m_Rigidbody.linearVelocity.y);
|
||||
|
||||
// Reset movement.
|
||||
m_ShouldJump = false;
|
||||
|
|
|
@ -27,6 +27,6 @@ public class SliderJoint2D_MotorSpeed : MonoBehaviour
|
|||
return;
|
||||
|
||||
// Set the text to show current values.
|
||||
m_Text.text = "Motor Speed = " + Mathf.Abs (m_SliderJoint.motor.motorSpeed).ToString ("n1") + "\n" + "Body Speed = " + (m_Body.velocity.magnitude).ToString ("n1");
|
||||
m_Text.text = "Motor Speed = " + Mathf.Abs (m_SliderJoint.motor.motorSpeed).ToString ("n1") + "\n" + "Body Speed = " + (m_Body.linearVelocity.magnitude).ToString ("n1");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.2d.sprite": "1.0.0",
|
||||
"com.unity.ide.rider": "3.0.28",
|
||||
"com.unity.ide.rider": "3.0.31",
|
||||
"com.unity.ide.visualstudio": "2.0.22",
|
||||
"com.unity.modules.animation": "1.0.0",
|
||||
"com.unity.modules.audio": "1.0.0",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.28",
|
||||
"version": "3.0.31",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -32,7 +32,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.test-framework": {
|
||||
"version": "1.4.4",
|
||||
"version": "1.4.5",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
m_EditorVersion: 6000.0.8f1
|
||||
m_EditorVersionWithRevision: 6000.0.8f1 (fa7102f01711)
|
||||
m_EditorVersion: 6000.0.18f1
|
||||
m_EditorVersionWithRevision: 6000.0.18f1 (3699cf869f9b)
|
||||
|
|
|
@ -3,6 +3,10 @@ This project contains multiple scenes that are designed to provide both examples
|
|||
|
||||
A majority of the scenes rely on Unity Gizmos for presentation of Colliders, Joints, Contacts (etc) rather than renderers so please ensure that the "Gizmos" buttons are selected in both the "Scene" and "Game" views otherwise you may find you cannot see the content.
|
||||
|
||||
## Game View
|
||||
|
||||
All the examples were designed with the Game window set to 16:9 Aspect. It is recommended that you change the Game window to this so that the Camera correctly displays the examples.
|
||||
|
||||
## Branch Names
|
||||
|
||||
Each branch represents a specific version of Unity. As features are added in a public release, those features should be represented in that branch and future Unity version branches i.e. branch names of "2019", "2020", "2021" (etc) exist.
|
||||
|
|
Загрузка…
Ссылка в новой задаче