See site in english Voir le site en francais
Website skin:
home  download  forum  link  contact

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Author Topic: Smooth vehicle movement  (Read 2292 times)

0 Members and 1 Guest are viewing this topic.

Offline dumbo2007

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
03 March 2011, 02:45:48
In UCGO how does Dan manage to move his cars so smoothly in code? I am trying to the same but havent had much success. Does he use thrusters only. If he uses thrusters then how does he ensure that the vessel passes through specific way points ? When a thruster is fired it is impossible to predict exactly where the vessel derived vehicle will end up.

Any one with experience making car addons please let me know as well if you have any idea how smooth vehicle movement is achieved.


Offline Tommy

  • Jr. Member
  • **
  • Posts: 32
  • Karma: 0
Reply #1 - 16 March 2011, 00:55:12
Dan's secrets are his own, but from reading the development threads I think I figured a few things out:

Thrusters are not used. Rather, the AddForce() function  (or something similar) is used for movement and control.

I also seem to recall Dan saying something about the COG being BELOW , or at least at the same height as, the touchdown points (ie, underground, or at ground level)

Essentially, UCGO uses it's own "hacks" to create it's own physics engine, working around the Orbiter Core's engine, rather than working with it.


Offline dumbo2007

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Reply #2 - 29 March 2011, 23:24:35
ok thanks. Basically I am trying to control the vehicle movement very accurately. The position is got via an external physics engine - Bullet - and the vessel is moved into position in every time step. I am getting smooth results using attachment points so far i.e. I attach the vessel to another vessel which acts as a base. Then move the attachment point around.

I also tried to use DefSetState() but that seems to cause some jitter so I will probably have to find a way to get around that .


Offline James.ep3

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Reply #3 - 08 April 2011, 07:43:34
Would a similar system create a vessel that had a sort of Sci-fi physics engine I wonder? this would be a useful thing to have if you were trying to do a complex manuver or trying to create a very fast vessel. Not that we need one I am just pointing out the possibilities if we made one.