Jump to content
Sign in to follow this  
Donnervogel

setVectorUp/vectorUp anomalies

Recommended Posts

ok so today I was playing around with those commands and I came across some weird things. I'm not 100% sure if they are bugs and which of them would be bugs so I thought I'd discuss it here first.

Problem 1:

when I use the command setVectorUp [0,1,0] from what I know about this it should result in an up vector that points straight along the y-axis, translated ingame, it should set the object rotated 90° along the x-axis.

Now in effect nothing happens. This puzzled me. Then I discovered if I use the same command twice after each other it works as it should.

I'd guess this is a bug.

Problem 2:

[EDIT]: Ok the second problem has solved itself, it was an error on my side wink_o.gif still the first remains.

Share this post


Link to post
Share on other sites

I did not miss that thread. That thread discusses how setVectorUp/Dir works and deals with trivial things about vector geometry. I was asking something else here. Trying to find out if this is a bug. Anyway I reported it already as a bug so let's see what BIS does with it.

I found those three things:

- you cannot seem to set the up vector to [0,0,1] at all.

- you can't set the up vector to [0,1,0] but there is a workaround by setting it first to some value that has a z value other than 0 ([0,1,z!=0]) and right after this setting it to [0,1,0] then it does work for some unknown reason.

- you can set the up vector to [1,0,0] with no problem.

Note that the 1 can be any value other than 0.The problem appears with the cases when the vector is pointing straight along one of the axis' of the coordinate system.

Also note that the command vectorUp doesn't return the values you have set but always a value between -1 and 1 which seems to represent the equivalent values on the unit circle.

Share this post


Link to post
Share on other sites
Quote[/b] ]That thread discusses how setVectorUp/Dir works and deals with trivial things about vector geometry.

Accurately rotate an object, around all three of it's axis, is trivial? The functionality provided by those commands, has been request\sought almost constantly prior to Arma.

I appreciate it might be boring for you, seen as you find the concept trivial and of an intermediate level. But why don't you drop by that thread and fill us in, on the details of 3D transforms and all the Maths behind it all? I’m sure everyone would appreciate your advanced knowledge on the subject.

Quote[/b] ]I was asking something else here. Trying to find out if this is a bug.

No, I don't think it is a bug smile_o.gif I would prefer to be able to control objects properly in all directions, rather than just slap in a couple of numbers via the editor, like [0,0,1].

Quote[/b] ]Anyway I reported it already as a bug so let's see what BIS does with it.

Perhaps you should just add a request on the wish list, for some simple commands like PointObjectUp PointObjectDown e.t.c ?

Share this post


Link to post
Share on other sites
Quote[/b] ]That thread discusses how setVectorUp/Dir works and deals with trivial things about vector geometry.

Accurately rotate an object, around all three of it's axis, is trivial? The functionality provided by those commands, has been request\sought almost constantly prior to Arma.

I appreciate it might be boring for you, seen as you find the concept trivial and of an intermediate level. But why don't you drop by that thread and fill us in, on the details of 3D transforms and all the Maths behind it all? I’m sure everyone would appreciate your advanced knowledge on the subject.

Quote[/b] ]I was asking something else here. Trying to find out if this is a bug.

No, I don't think it is a bug smile_o.gif I would prefer to be able to control objects properly in all directions, rather than just slap in a couple of numbers via the editor, like [0,0,1].

Quote[/b] ]Anyway I reported it already as a bug so let's see what BIS does with it.

Perhaps you should just add a request on the wish list, for some simple commands like PointObjectUp PointObjectDown e.t.c ?

eh what is wrong with you? I didn't say the other thread was stupid. I said trivial because it is trivial. That doesn't mean it's stupid. It's good actually so people can inform themself about how it works. I just didn't want to clutter up the discussion about how it works with a discussion about some very special things that I have not confirmed totally yet.

Perhaps you don't understand what I am saying. I don't want a command to point an Object up, down whatever. I want to find out why the scripting command does not work as I would expect it.... hence why some values don't seem to work and if it is a bug. I am rotating objects all the time and it seems to work properly with all values in between. But I ran into those anomalies with the extreme values under some conditions. I think this is a bug and if it is it would be good if BIS would fix it, don't you agree? Or do you want a command to not work as it should?

Share this post


Link to post
Share on other sites
Quote[/b] ]eh what is wrong with you? I didn't say the other thread was stupid. I said trivial because it is trivial.

Well considering I spent a fair few days working that out from scratch and bothered to share the info on the forums. Then I reserve the right to be defensive, when someone starts to use words like trivial. Obviously, this topic is familiar with more than one forum visitor, yet none of them have bothered to add anything to the discussion, by way of refinements or additional scripts and equations. I wonder if anyone would have ever posted anything about these commands?

Quote[/b] ]I am rotating objects all the time and it seems to work properly with all values in between. But I ran into those anomalies with the extreme values under some conditions.

Yeah, I didn't understand what you were asking. But now you have explained how you came to your deductions, I can understand your point.

Quote[/b] ]I think this is a bug and if it is it would be good if BIS would fix it, don't you agree?

That’s the first thing I became aware of when I started messing around with this. At least, values passed into setVectorUp, are returned with different values from vectorUp. But I put that down to the idiosyncrasies of the engine. I didn't care, if I told an object to point in any particular direction, it worked. So that side at least, didn't appear bugged?

MidShips made some good points in that thread, one in particular springs to mind:

Quote[/b] ]With 1.02, physics now applies at once. If one tilts the center of gravity from a barrel too far about for instance the x axis, it falls to the side. If one choose a small angle about x, it tilts back into it's normal, stable position. Therefore the effect in positioning the object by SetVectorUp sometimes only could be visible at the initial moment.

It's impossible to comment on the extreme circumstances you referred to in your reply. I guess it will be as equally hard for BIS to figure it out too, unless you gave them exact details? But for me, the command works as expected. If I use those scripts, to calculate the required values.

Share this post


Link to post
Share on other sites

I have done the testing with both objects that respond to ingame physics and such that don't. The problem applies with them all. Besides the extreme situations would even with the physics lead to great changes in position so it should be visible anyway.

I have tracked down the situation when the problem applies pretty well I think so BIS knows what to look for. I don't see any difficulty there.

What indicates a bug is that you *can* set the up Vector to [0,1,0] but you need to set it to some other z-value directly before or it it won't work. This IMHO is a clear indication of a bug because I can't think of such a behaviour to be wanted.

concerning vectorUp. It returns normalised vectors. Those are (ignoring rounding errors) equivalent values to what you set.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×