Page MenuHomeFeedback Tracker

VectorUp doesn't return unit vector
New, NormalPublic

Description

The vectorUp command doesn't always return a unit vector (vectorMagnitude _vector != 1). I'm not sure if it's intentional but at least that is the expected behavior (similar to vectorDir command).

This might potentially be a bug in the setVectorUp command (if it sets the vectorUp incorrectly, the return value is also incorrect).

Details

Severity
Minor
Resolution
Open
Reproducibility
Sometimes
Operating System
Windows 7
Category
Scripting
Steps To Reproduce

You can test the command on some terrain objects. For example, on Stratis:

  1. Use this code to teleport the player to the desired location:
player setPosASL [2253.21,5686.22,6.02753]

Or alternatively, move to grid 022056.

  1. Look at the "tunnel" object shown below:

  1. Execute this command:
vectorUp cursorObject
  1. You'll see that the result is:
[0,0,2.31199]

which is not a unit vector.

It should be:

[0,0,1]

Event Timeline

Leopard20 updated the task description. (Show Details)
dedmen added a subscriber: dedmen.Apr 22 2020, 3:42 PM

repro with example return value and expected return value please.
if you mean a terrain object then please provide coordinates, or optimally a setPos script

Leopard20 updated the task description. (Show Details)Apr 22 2020, 8:03 PM
Leopard20 edited Steps To Reproduce. (Show Details)

@dedmen Sorry about the lazy report.
I updated the task description and repro steps.

Leopard20 updated the task description. (Show Details)Apr 22 2020, 8:11 PM
Leopard20 updated the task description. (Show Details)Apr 22 2020, 8:18 PM
Leopard20 updated the task description. (Show Details)
Leopard20 updated the task description. (Show Details)Apr 23 2020, 3:12 PM
Leopard20 edited Steps To Reproduce. (Show Details)