This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class EntityExtensions | |
{ | |
public static void LookAt(this Entity e, Vector3 target) | |
{ | |
float azimuth = GetLookAtAngles(e.Transform.Position, target, out float altitude); | |
var result = Quaternion.RotationYawPitchRoll(azimuth, -altitude, 0); | |
e.Transform.Rotation = result; | |
} | |
public static Vector3 Position(this Entity e) => e.Transform.Position; | |
private static float GetLookAtAngles(Vector3 source, Vector3 destination, out float altitude) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Stride.Core.Mathematics; | |
using Stride.Engine; | |
using Stride.Input; | |
namespace SomeNameSpace | |
{ | |
public class CameraFollow : SyncScript | |
{ | |
public float DelaySpeed = 0.6f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Stride contributors (https://stride3d.net). | |
// Distributed under the MIT license. | |
using Stride.Engine; | |
using Stride.Graphics; | |
namespace Additionals.Shader.ShadertoyExam | |
{ | |
[Display("RainDrops effect")] | |
[ComponentCategory("Effects")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Stride contributors (https://stride3d.net). | |
// Distributed under the MIT license. | |
// This component must be attached to Entity with Skeleton (Model component with skeleton) | |
using Stride.Core; | |
using Stride.Engine; | |
using Stride.Core.Mathematics; | |
using Stride.Rendering; | |
using Stride.Core.Annotations; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Stride contributors (https://stride3d.net). | |
// Distributed under the MIT license. | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Stride.Core; | |
using Stride.Core.Annotations; | |
using Stride.Core.Mathematics; | |
using Stride.Engine; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Stride contributors (https://stride3d.net). | |
// Distributed under the MIT license. | |
using Stride.Core.Mathematics; | |
using Stride.Engine; | |
using Stride.Input; | |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using Stride.Core; | |
using Stride.Core.Annotations; | |
using Stride.Engine; | |
using Stride.Rendering; | |
using Stride.Core.Mathematics; | |
using Stride.UI; | |
using Stride.UI.Panels; | |
using Stride.UI.Controls; | |
using Stride.Graphics; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Stride contributors (https://stride3d.net). | |
// Distributed under the MIT license. | |
using System; | |
using Stride.Core.Mathematics; | |
using Stride.Engine; | |
[Display("Elliptical Movement with Entity Rotation")] | |
[ComponentCategory("Movements")] | |
[DataContract(nameof(EllipticalMovementRotateEntity))] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Stride contributors (https://stride3d.net). | |
// Distributed under the MIT license. | |
using System; | |
using System.Collections.Generic; | |
using Stride.Core.Mathematics; | |
using Stride.Engine; | |
using Stride.Core; | |
using Stride.Rendering; | |
using Stride.Core.Annotations; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) Stride contributors (https://stride3d.net). | |
// Distributed under the MIT license. | |
using System; | |
using System.Collections.Generic; | |
using Stride.Core.Mathematics; | |
using Stride.Rendering; | |
using Stride.Games; | |
using Stride.Graphics; | |
using Buffer = Stride.Graphics.Buffer; |
NewerOlder