Author Topic: How to ignore the terrain movement?  (Read 489 times)

FelixYu

  • Newbie
  • *
  • Posts: 9
    • View Profile
How to ignore the terrain movement?
« on: May 23, 2021, 07:25:06 pm »
I want to make a new vehicle. The idea is to fly regardless of terrain. Which key parameters need to be changed?

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1960
    • View Profile
Re: How to ignore the terrain movement?
« Reply #1 on: May 24, 2021, 11:31:52 am »
Hello!

It's not trivial. Technically, you can remove the physical collider, e.g. for hoverboard (in the base class for all hoverboards) we define physics this way https://github.com/AtomicTorchStudio/CryoFall/blob/be9eca9588d0adc4e8eb5d7c904b64d0b3dfc6b6/Core.cpk/Scripts/Vehicles/Base/ProtoVehicleHoverboard.cs#L231
However, it will allow passing through any obstacles (including walls).
Making it pass only through terrain/cliffs is not possible as it will require a much more complex physical collider approach for the whole game (not only for the vehicle) and will cause other problems as well (e.g. when a player wants to dismount the vehicle in the middle of a cliff or over water).

Regards!