Jump to content
bijx

How to continuously rotate a static object using scripts

Recommended Posts

I am creating a mission where I am using a texture loaded on a "User Texture" object in game, and I am trying to have the image rotate around the X axis continuously while the mission is running. Is there a simple script to do this? I presume it uses some sort of loop but I can't figure out adjusting timing (for example: 5 rotations per minute)

Share this post


Link to post
Share on other sites

You should implement the rotation through per-frame event handlers so that it rotates smooth. These commands will help:
https://community.bistudio.com/wiki/diag_deltaTime
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler#EachFrame

Also if you are making it work in multiplayer, perhaps you will have to perform this client-side with a client-side object, because if you just do the rotations on the server, probably it won't look so smooth on client since values will most likely not be interpolated, and I am not sure if Arma server broadcasts updates of such static objects very often.
 

  • Like 1

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

×