Forum rules - please read before posting.

Variable: Check vector3 issue

edited October 2020 in Technical Q&A

Hi

After running the New Game Wizard to create a 3D scene, I created a cutscene with a Variable:Set action to set a global vector3 variable to (0,0,3). Immediately checking this variable against itself with Variable:Check, indicates that they are not equal. I added a debug line to ActionVarCheck.cs line 291 which shows that vector3Value is (0,0,0) for some reason.

Can anybody explain the discrepancy? Thanks!

https://imgur.com/XM8CLS0

-Stephan

Comments

  • edited October 2020

    Welcome to the community, @Octano.

    It looks like an unfortunate bug. Apologies.

    I will attempt a recreation and let you know of a fix - thanks for alerting me.

  • Recreated. To fix, open up ActionVarCheck and insert the following into line 287 (above the switch statement):

    if (_compareVar != null)
    {
        switch (vectorCondition)
        {
            case VectorCondition.EqualTo:
                return (_var.Vector3Value == _compareVar.Vector3Value);
    
            case VectorCondition.MagnitudeGreaterThan:
                return (_var.Vector3Value.magnitude > _compareVar.Vector3Value);
        }
    }
    
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.