acdamiani / schema

Visual intelligence for the Unity game engine
https://schema-ai.com
MIT License
53 stars 4 forks source link

RotateTowardsVector resets references when I hit play #16

Closed ijisthee closed 8 months ago

ijisthee commented 8 months ago

In Edit mode: image

After I hit play: image

Maybe the new statement is the bad guy here.

public class RotateTowardsVector : Action
{
    [Tooltip("Current managed vector")] public BlackboardEntrySelector current = new BlackboardEntrySelector(); // <-- this one

    [Tooltip("Target vector")] public BlackboardEntrySelector target = new BlackboardEntrySelector(); // <-- this one

    [Tooltip("The maximum angle in radians allowed for this rotation")]
    public BlackboardEntrySelector<float> maxRadiansDelta;

    [Tooltip("The maximum allowed change in vector magnitude for this rotation")]
    public BlackboardEntrySelector<float> maxMagnitudeDelta;

    [Tooltip("Blackboard variable to store the new rotated vector in"), WriteOnly] 
    public BlackboardEntrySelector rotated = new BlackboardEntrySelector(); // <-- this one
acdamiani commented 8 months ago

Fixed by #17