Jump to content
Niklas Dennerståhl

Problem with rotation using setVectorUp

Recommended Posts

Hey, I'm new to the arma 2 editor and I'm working on adding some buildings to the chernarus map in my own mission. I want to be able to rotate buildings to keep them level and have walls follow the terrain etc. I've done some reading and setVectorUp seems to be a nice way of doing that but I can't get it to work. Simply adding _this setVectorUp[0,1,0]; to the ini expression field or directly in the sqf file yields no results. The object remains the same. I would immensely appreciate any guidance here, thanks in advance!

Share this post


Link to post
Share on other sites

Try;

this setVectorUp [0,0,1];

This levels the object to the terrain for me.

  • Like 1

Share this post


Link to post
Share on other sites

To keep object objectively level to the sky:

this setVectorUp [0,0,1];

To keep object objectively level to the terrain slope:

this setVectorUp surfaceNormal position this;
  • Like 1

Share this post


Link to post
Share on other sites

Yay, It works! Thanks a bunch guys. Been stuck with this for a couple of days. I had tried a bunch of different version of the syntax but I guess never this one. Again massive thanks for taking the time to respond!

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

×