Page MenuHomeFeedback Tracker

When you scale an object, vectorDir and vectorUp don't return unit vector
Closed, ResolvedPublic

Description

The when you scale an object, the vectorDir and vectorUp commands don't return a unit vector anymore, and instead return a vector scaled by the getObjectScale value.
modelToWorld, vectorModelToWorld, and other commands are affected too

Details

Severity
Minor
Resolution
Not A Bug
Reproducibility
Always
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)
Leopard20 renamed this task from VectorUp doesn't return unit vector to When you scale an object, vectorDir and vectorUp don't return unit vector.Jul 29 2021, 4:04 PM
Leopard20 updated the task description. (Show Details)
Leopard20 changed Reproducibility from Sometimes to Always.
LouMontana changed Resolution from Open to Not A Bug.Jul 29 2021, 4:33 PM
LouMontana closed this task as Resolved.