AtomicTorch Studio Forums

CryoFall => Modding info => Topic started by: FelixYu on May 23, 2021, 07:25:06 pm

Title: How to ignore the terrain movement?
Post by: FelixYu 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?
Title: Re: How to ignore the terrain movement?
Post by: ai_enabled 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!