
Date: 14.10.2014 | By: Skript47
Type: Demo | Game: Unity 3D
Небольшая демонстрация работы скрипта C# который автоматически считывает структуру модели авто (в данном случае настроен под работу с иерархией моделей GTA SA). 700 строчек кода.
Type: Demo | Game: Unity 3D
- Автоматически генерирует коллизию convex из компонента chassis и делает её невидимой для рейкастов
- Генерирует 4 колеса и создает WheelCollider для них, автоматически добавляет Rigidbody
- Отключает и включает chassis_vlo (LOD) в зависимости от того на каком расстоянии авто находится от камеры
- Клонирует односторонние dummy: ped_frontseat, ped_backseat, headlights, taillights...
- Создает эффекты дыма для выхлопной трубы и свет для фар, автоматически загружая их префабы из папки Resources
- Считывает и записывает в массив все extra детали
- Создает dummy для радио и автоматически добавляет к ним AudioSource
- Находит все детали использующие материал Primary (RGB 60, 255, 0) благодаря чему можно менять их цвет
- Хранит данные о статусе повреждения каждого компонента авто
- И еще выполняет множество других функций
- 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