mcnools 62 Posted January 9, 2011 Well, I've always wondered about this. Is there a way to prevent objects from aligning to the terrain? In other words, stop them from leaning if they're placed on a slope. I'd like to prevent sandbags I place from leaning all over the place etc. Is there any simple way to do it, or do you have to tilt each object manually with some sort of tilt-command? (in the mission editor of course). Share this post Link to post Share on other sites
nuxil 2 Posted January 9, 2011 you need to change the vector. there is a bis funtction that does this. but i dont remember the name or use it. but you can do it with setvectorDir if its the pitch and setvectorUp if its the bank you need to change. if its both,. you can mix the two commands or use setVectorDirAndUp http://community.bistudio.com/wiki/setVectorDirAndUp Share this post Link to post Share on other sites
onlyrazor 11 Posted January 9, 2011 You could just try placing them on flat ground and then using setPos to move them to where you want ;) Share this post Link to post Share on other sites
Acecool 0 Posted January 9, 2011 Make them spawn at a marker: // For accuracy _temp setPos _markerPosition; Should make it level. Either that, or find the nearest road and _temp setDir direction _nearestRoad Share this post Link to post Share on other sites
[aps]gnat 28 Posted January 9, 2011 this setVectorUp [0,0,1]; Share this post Link to post Share on other sites
mcnools 62 Posted January 9, 2011 (edited) Gnat;1830642']this setVectorUp [0,0,1]; That worked perfectly! thank you very much! Edit: It seems that it doesn't work together with the setpos-init to raise/lower the object though, is there any way around this? Edited January 9, 2011 by McNools Share this post Link to post Share on other sites
Gekkibi 11 Posted January 9, 2011 That worked perfectly! thank you very much!Edit: It seems that it doesn't work together with the setpos-init to raise/lower the object though, is there any way around this? Yes. Do setVectorUp after you have setPos. Share this post Link to post Share on other sites