Jump to content
Sign in to follow this  
MrCopyright

lightAttachObject and attachTo desync

Recommended Posts

Hello.

 

I am currently using the lightAttachObject command to attach a light source to a vehicle. However, when the vehicle moves, the light source appears to lag behind. You can see it stuttering and jolting which is not the desired effect I am looking for. I am using the command in the editor so it cannot be blamed on server lag. I also tried using the attachTo command but it yields the same effect. Any help is appreciated.

Share this post


Link to post
Share on other sites

This effect is unavoidable.

 

Only thing I can think of is to create a very nasty loop to spam attachTo if the vehicle is moving. Something I might consider for cinematic but would not punish the players with for gameplay.

 

while {CONDITION} do {
        light attachTo [car.....
       //no sleep!
};

Share this post


Link to post
Share on other sites

Unfortunately, this does not seem to work. Regardless of how regularly you re-position the light source, it still assumes the last position. Thanks for the help anyway, I guess I'm going to have to bite the bullet on this one...

Share this post


Link to post
Share on other sites

Yeah, apparently created lightpoints aren't simulated on every frame, probably for performance reasons.

 

So your only option is to use existing objects with a light or create a modded one. Then the normal attachTo works without lag.

 

Would "Land_Camping_Light_F" look too out of place on the roof of your car? :D

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  

×