initial upload

This commit is contained in:
tom.hempel
2025-09-21 22:42:26 +02:00
commit d03bcd4ba5
6231 changed files with 351582 additions and 0 deletions

View File

@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 0b8026c3c09aa423aac7dc8017e58e86
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 9b5d4a6e6da554dfd89a76e257421fb2
folderAsset: yes
timeCreated: 1434626795
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,45 @@
using UnityEngine;
using System.Collections;
using RootMotion;
using RootMotion.FinalIK;
namespace RootMotion.Demos {
/// <summary>
/// Demo for aiming a Turret. All it does is call Transform.LookAt on each part and apply rotation limits one by one, starting from the parent.
/// </summary>
public class Turret : MonoBehaviour {
/// <summary>
/// An independent part of the turret
/// </summary>
[System.Serializable]
public class Part {
public Transform transform; // The Transform
private RotationLimit rotationLimit; // The Rotation Limit component
// Aim this part at the target
public void AimAt(Transform target) {
transform.LookAt(target.position, transform.up);
// Finding the Rotation Limit
if (rotationLimit == null) {
rotationLimit = transform.GetComponent<RotationLimit>();
rotationLimit.Disable();
}
// Apply rotation limits
rotationLimit.Apply();
}
}
public Transform target; // The aiming target
public Part[] parts; // All the turret parts
void Update() {
// Rotate the turret parts one by one
foreach (Part part in parts) part.AimAt(target);
}
}
}

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 287e53df824774c4dbfc71e796a515f5
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 3331caf4c834342f083a159e5ab50603
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant: