Jump to content
Sign in to follow this  
zodd

Object remains floating on detach

Recommended Posts

I am doing up a basic supply carrying/loading script for a mission I am making; works perfectly so far (Players can grab barrels and move them to vehicles, load them in the back and unload them)

I am using the attachTo and detach for this however when I detach a barrel and they are above the ground level, they just float there (ie. no gravity/physics)

Does anyone know how to re-enable gravity on these objects? Current workaround is just setPos to ground level but surely there is a better way? (Or at least ANOTHER way?)

Share this post


Link to post
Share on other sites
I am doing up a basic supply carrying/loading script for a mission I am making; works perfectly so far (Players can grab barrels and move them to vehicles, load them in the back and unload them)

I am using the attachTo and detach for this however when I detach a barrel and they are above the ground level, they just float there (ie. no gravity/physics)

Does anyone know how to re-enable gravity on these objects? Current workaround is just setPos to ground level but surely there is a better way? (Or at least ANOTHER way?)

You could try

 this enableSimulation true;

See Arma Wiki enableSimulation command

Share this post


Link to post
Share on other sites

Also ty

_object setVelocity [0,0,-.1];

Share this post


Link to post
Share on other sites

enableSimulation didnt work (tried it first up)

Neither did setVelocity.... strange?

Share this post


Link to post
Share on other sites

I am using it now but because it has different results when in a vehicle (the player is higher) I was hoping for physics to take over. (And seems like it logically should be able to if something is above the ground)

Although interestingly... with the metal bins gravity doesnt seem to want to work but I changed to the plastic bins and they work fine!

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  

×