Jump to content
Sign in to follow this  
roguetrooper

Spawn vehicle with all wheels on oblique ground

Recommended Posts

When you spawn an (at least) empty vehicle on oblique ground, the vehicle partially 'floats' above the ground. What can be done (by script) to have all wheels touch the ground?

Share this post


Link to post
Share on other sites

Shoot it. :)

A setPos might work too, but when dealing with servers anything can happen. A perfectly laid out checkpoint in the editor will be completely wonky once you get it on the server for example.

Share this post


Link to post
Share on other sites

This should work:

_vehicle setPos (getPos _vehicle);

Share this post


Link to post
Share on other sites

Try setPos the car a couple of meters in the air. It should fall perfectly flush with the ground.

this setPos [(getPos this select 0),(getPos this select 1),2];

Share this post


Link to post
Share on other sites

Actually, for best results I force a physics update by giving the car a small velocity down;

this setVelocity [0,0,1];

Always does the trick for me :)

Setpos I generally find doesn't work, because a new vehicle with no-one in it doesn't receive a physics update.

Share this post


Link to post
Share on other sites

Thanks, folks. "vehicle setpos (position vehicle)" does a good job, all tires are on the ground. I could have found out myself (lol) but I thought setpos would place the vehicle in the same 'wrong' way.

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  

×