gc8 970 Posted March 1, 2019 Hi is it somehow possible to glue objects to terrain so they wont flip over on hills? I spawn some stuff from composition and satellite dish or static weapons tend to flip over thx! Share this post Link to post Share on other sites
johnnyboy 3743 Posted March 1, 2019 Maybe putting this in the object's init might help. Will align object with surface slant. this setVectorUp surfaceNormal position this; Or, if the objects are just for eye candy, you could disable simulation on them: this enableSimulation false; Or, you can place as small object that won't fall over like a screwdriver object, then attach your larger object to the screwdriver. 1 1 Share this post Link to post Share on other sites
gc8 970 Posted March 1, 2019 @johnnyboy Thanks for those two commands, I used them both to make the object stick on the terrain. Looks bit funny to have the objects hang on mountain but I guess you cant have everything 🙂 What about static weapons, can AI use them if their simulation is disabled? 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted March 1, 2019 You can use the attachto with another object and hide the first object after. 1 1 Share this post Link to post Share on other sites
JohnKalo 657 Posted March 1, 2019 Quote What about static weapons, can AI use them if their simulation is disabled? I believe so yes because there are scripts which attack turrets on vehicles and they still work. 1 Share this post Link to post Share on other sites
gc8 970 Posted March 1, 2019 5 minutes ago, JohnKalo said: I believe so yes because there are scripts which attack turrets on vehicles and they still work. I just tested this by placing turret with gunner in the editor and disabled the simulation of the turret (enableSimulation) and the gunner did not shoot nor could be killed. Share this post Link to post Share on other sites
johnnyboy 3743 Posted March 1, 2019 9 minutes ago, JohnKalo said: I believe so yes because there are scripts which attack turrets on vehicles and they still work. That is true. I have attached turrets to vehicles, and they still work. I did this in JBOY_LongBoat. 1 Share this post Link to post Share on other sites
gc8 970 Posted March 1, 2019 Does anyone know how to check if the angle of the slope is too great for object placing? Share this post Link to post Share on other sites
GEORGE FLOROS GR 4206 Posted March 1, 2019 20 minutes ago, gc8 said: how to check if the angle of the slope is too great for object placing? You can add to check the position before spawning with https://community.bistudio.com/wiki/isFlatEmpty and https://community.bistudio.com/wiki/BIS_fnc_findSafePos 1 Share this post Link to post Share on other sites
gc8 970 Posted March 2, 2019 13 hours ago, GEORGE FLOROS GR said: You can add to check the position before spawning with https://community.bistudio.com/wiki/isFlatEmpty and https://community.bistudio.com/wiki/BIS_fnc_findSafePos i thought this could be accomplished with surfaceNormal but maybe I'm wrong. Not very good at math Share this post Link to post Share on other sites
phronk 895 Posted March 2, 2019 Have you tried Bob setVectorUp [0,0,0]; or Bob setVectorUp [0,0,1]; Share this post Link to post Share on other sites
gc8 970 Posted March 2, 2019 2 hours ago, phronk said: Have you tried Bob setVectorUp [0,0,0]; or Bob setVectorUp [0,0,1]; Yup, post #2 Share this post Link to post Share on other sites