Code (CSharp):
- using System;
- using Unity.Entities;
- [GenerateAuthoringComponent]
- public class RotateSpeed1 : IComponentData
- {
- public float speed;
- }
Code (CSharp):
- protected override void OnUpdate()
- {
- float deltaTime = Time.DeltaTime;
- Entities.
- ForEach((ref Rotation rotation, in RotateSpeed1 rotateSpeed) => {
- rotation.Value = math.mul(
- math.normalize(rotation.Value),...