LiveToWin34 - Official Blog
This website uses cookies. We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. The blog is officially closed in 2023 and all new content will be published on the new version of the site https://livetowin34.gumroad.com. You can also find us in discord LiveToWin34#2961 or by using any of the links below:

Unity 3D Vehicle Struct Reader

Unity 3D GTA SA Car Drive
Date: 14.10.2014 | By: Skript47
Type: Demo | Game: Unity 3D
Небольшая демонстрация работы скрипта C# который автоматически считывает структуру модели авто (в данном случае настроен под работу с иерархией моделей GTA SA). 700 строчек кода.
  • Автоматически генерирует коллизию convex из компонента chassis и делает её невидимой для рейкастов
  • Генерирует 4 колеса и создает WheelCollider для них, автоматически добавляет Rigidbody
  • Отключает и включает chassis_vlo (LOD) в зависимости от того на каком расстоянии авто находится от камеры
  • Клонирует односторонние dummy: ped_frontseat, ped_backseat, headlights, taillights...
  • Создает эффекты дыма для выхлопной трубы и свет для фар, автоматически загружая их префабы из папки Resources
  • Считывает и записывает в массив все extra детали
  • Создает dummy для радио и автоматически добавляет к ним AudioSource
  • Находит все детали использующие материал Primary (RGB 60, 255, 0) благодаря чему можно менять их цвет
  • Хранит данные о статусе повреждения каждого компонента авто
  • И еще выполняет множество других функций
Скачать исходники: Unity 3D Demo 1.
A small demonstration of the C # script that automatically reads the structure of the model of car (in this case, is set to work with a hierarchy of models of GTA SA). 700 lines of code.
  • Automatically generates conflict convex component of the chassis makes it invisible to raycasts
  • Generate a 4-wheel drive and creates WheelCollider for them automatically adds Rigidbody
  • Disable and enable chassis_vlo (LOD) depending on how far away a car is away from the camera
  • Clones unilateral dummy: ped_frontseat, ped_backseat, headlights, taillights...
  • to create the effect of smoke to the exhaust pipe and the light of the headlamps are automatically loaded prefabs folder Resources
  • Read and write in an array of all the extra details
  • Create a dummy radio and automatically adds them AudioSource
  • Find the all the details of using the material Primary (RGB 60, 255, 0) so that you can change their color
  • Stores data on the status of each component damage cars
  • And still performs many other functions
Download Unity 3D Demo 1.