
Explore digital twin integration in Unity to virtually design, animate, and test production-line machines using provided CAD models, mastering physics-based simulations and 3D interactions from scratch.
Install Unity and Visual Studio to begin this course; download from unity.com, run the setup, follow prompts, then install Visual Studio to write C# scripts.
Install Visual Studio 2022 community edition to support Unity development in robotics and mechatronics, then download and follow the setup steps from the Microsoft site.
Explore the basics of unity, a physical simulator, and learn to simulate materials, colliders, rigid bodies, and linear and rotational motions using C sharp for digital twin industrial machines.
Learn to set up Unity with Unity Hub, create a 3D project, navigate the scene and game views, and manage cameras, lighting, and imported CAD models for basic 3D objects.
Explore 3D objects in Unity, from basic shapes like cube, sphere, cylinder, and plane. Understand transform properties—position, rotation, scale—and use empty objects to group and move items together.
Create a materials folder in Unity, then build and colorize materials and physical materials, adjust coloration, metallic, and smoothness, apply them to objects, and learn two methods to colorize models.
Build a simplified Unity room using cubes for walls and floor, rename and duplicate pieces, apply blue walls and a green floor, and explore scene versus game view.
Discover how colliders in Unity enable accurate collisions in digital twins by using sphere, box, capsule, and mesh colliders, adjusting fit, and pairing with rigid bodies.
Adjust gravity in Unity by changing the gravity parameter in settings to explore realistic versus scaled gravity, and observe how object size affects fall speed; then test properties for bounce.
Create and modify c sharp scripts in Unity to drive disk rotation with physics, using start and update functions and basic object oriented scripting concepts.
Explore the difference between scripted rotation and natural physics in digital twins by rotating the disk with a script while bottles stay rigid to interact naturally with barriers and gravity.
Explains fixed delta time in Unity, uses 0.02 seconds for about 50 physics updates per second, and contrasts it with delta time and fps.
Learn rotational physics in Unity by rotating a cylinder with a rigid body accurately. Use fixed delta time and degrees per second to drive digital twins with quaternion Euler rotation.
Create rotating disk by replacing the capsule collider with a convex mesh collider, add a rigid body, and implement a c sharp script using quaternion and rb.moveRotation for controlled rotation.
Create a cylinder on a rotating table; replace the capsule collider with a convex mesh collider, and tune mass, gravity, angular drag, and friction for stable digital twin interactions.
Add a barrier as a box to study its interaction with the cylinder and rotational disk, using colliders to simulate collisions and discuss friction, mass, and rotational speed effects.
In Unity, we duplicate and group multiple cylinders under a parent object, assign rigid bodies and physics materials, and tune friction and bounciness to achieve realistic rotation and multi-object interaction.
Learn how to digital twin conveyor belts in Unity by using position and move position with a rigidbody, enabling linear movement without belt rotation and simulating interactions with barriers.
Prototype a conveyor in Unity by creating a cube with a collider and a rigid body, enabling kinematic control, and scripting back-and-forth movement to test physics with a box and barrier.
Achieve belt animation in Unity by applying a moving texture offset via a shader, adjusting tiling, and scripting conveyor motion with a speed parameter.
Learn to change a rotation pivot by making a sphere a child of a designed pivot, enabling rotation around a custom axis for accurate digital twins in Unity.
Explore linear motion for digital twinning by moving 3d objects along x, y, z with vector3 direction, speed, and time.deltaTime-driven translation across forward, back, right, left, up, and down.
Explore how triggers control movement in Unity by setting up a sensor and carriage, using isTrigger, rigidbody (kinematic), and OnTriggerEnter/Exit with a sensor tag to stop and reverse a motor.
Model a piston in Unity by using a kinematic rigid body, extending and retracting with move towards and distance checks, controlled by target and origin positions in a script.
Treat the piston as a rigid body and store its original and target positions. Start the motion to the target with movePosition, then return to the original position.
Debug and refine a piston-based motion loop in Unity by adjusting start conditions, thresholds, and object interactions to simulate up-and-down mechanical movement for digital twin machines.
Animate shafts, pulleys, and belts to digitally twin a conveyor belt, inspect the provided 3D model, and pass products between conveyors while simulating inclined conveyor physics in mini projects.
Learn to digitally twin a 3d conveyor belt by animating its belt, shaft, bearings, and drive motor, and enabling object interaction with gravity and barriers in unity.
Import a CAD assembly via FBX into Unity, inspect embedded parts like screws and bearings, and unpack prefabs to reposition components and set Y-axis pivot points for shaft rotation.
This Unity lecture on digital twin machines shows importing and unpacking a coal conveyor, creating an environment, and constructing drive and back pivots to rotate shafts and pulleys.
Place the shaft, bearing, and pulley parts in the drive pivot, then set z and y to 90 to rotate on the x axis. Repeat for the second pivot.
Design and assemble a rotating idler pulley system by fixing pivots, adding a shaft, bearings, and pulley, and implementing a script to rotate the pulleys around the back pivot.
Combine pivots into one script to rotate two conveyor pulleys simultaneously in Unity. Press start to trigger both rotations, using public game objects and a speed float with time delta.
Adjust belt material tiling and x-axis offset in Unity, then implement a belt animation with a speed parameter and synchronize belt and rotation animations to start with a single button.
Create a centralized start button by making a start button script with one boolean, pass it to build animation, conveyor pulleys, and belt scripts, and link to an empty object.
Create a Unity conveyor motion control by grouping the start button, speed control, pivots, and belt, then link a conveyor speed control script to manage pulley and belt speed.
Explore conveyor physics in Unity by implementing a kinematic rigid body, disabling gravity, and applying a scripted speed to belt objects, with directional options like right, left, forward, and back.
Integrate the conveyor speed with the existing speed control, defining a conveyor speed and a belt-pulley ratio. Test and refine in Unity’s physics simulation, adjusting start conditions and barriers.
Add mesh colliders to barriers in a Unity scene and group them under a barriers object. Start the control panel to observe barrier collisions with the conveyor.
Tune gravity in project settings to achieve realistic drops, then build cylinders with mesh colliders and convex rigid bodies to test friction and conveyor balance.
Learn to read a conveyor's y-rotation in Unity using quaternions, compute current orientation, and map 0/90/180/270 degrees to right, forward, left, or backward movement.
Set up multiple conveyors side by side, create a level difference with a raised platform, and test passing objects through sequential belts using conveyor control and speed adjustments.
Resolve the incline conveyor issue by replacing Euler angles logic with a dedicated inclined conveyor script, hardcoding direction, adjusting start speeds, and validating the Unity simulation of conveyors and platforms.
Build a platform environment with cubes in Unity, adjust extruders and conveyors with angled variants to touch the ground, duplicate and rotate platforms from a top view, and color materials.
Explore how sensors feed digital twins by reading feedback signals and mimicking proximity sensor detection of objects in Unity.
Unity demonstrates adding proximity sensors to a conveyor to read status and detect when a bottle reaches a target point, and importing a conveyor scene with existing actuators.
Create a dummy sensor in Unity, including a mount and a cylinder sensor, then use an invisible beam collider to detect objects in front and generate signals.
Count objects passing near a Unity beam with on trigger enter and on trigger exit, adjust beam size and spacing, and prepare to link sensor feedback to PLC.
Explore single axis linear guides and their digital twin for accurate end effector motion; animate them and build a mini packaging line with conveyors.
Demonstrates a digital twin of a linear guide system driven by a lead screw and motor for precise motion. Explain the nut, carriage, bearing, and frame.
Import a cad design into a Unity project, create an assets folder, drop and scale it tenfold, rotate it -90 degrees on the x axis for the digital twin.
Create a single axis pivot in Unity and apply an axis-rotate script to spin the parts—the lead screw, bearing, motor shaft, and coupler—around an axis for a digital twin animation.
Integrate script, attach axis rotate to pivot, and run a Unity simulation to set speed to 100 and direction to -100, then animate carriage components: knot, cage, and nut holder.
Group the nuthouse and nut on a carriage, align to the correct axis, then script sliding with speed and start controls, translating along the z axis and adding collision triggers.
Implement triggers to stop the motor when limit sensors detect contact, create limit switch objects, assign trigger tags, and configure rigidbody and mesh collider components.
Define forward and backward movement with two buttons, implement stop logic, and refine triggers and collisions in Unity using conditional flow and limit switches.
Create on trigger enter logic in Unity to distinguish right and left sensors with tags and stop forward or backward motion accordingly, for motion limit part 3.
Implement auto orientation detection for a linear guide in Unity, mapping rotation angles to forward, backward, right, left, and up or down moves across orientation states 0–4.
Combine linear guides, two conveyors, and a rejection piston to dispatch a product into a box and move it to the next line in a Unity digital twin.
Export and import Unity projects to preserve animations and scripts when integrating a conveyor with a one-axis linear guide, supporting a digital twin workflow.
Build a unity packaging line by importing a conveyor, piston, and tray, then create a simple box and enable physics to visualize object flow.
Build a physics-driven conveyor in Unity by replacing translate with a rigid body move position, adding colliders and scripts to synchronize the tray with the nut house for real interaction.
Replace the mesh collider with a box collider to fit the object, adjust rigid body physics, and tune gravity and conveyor speed in Unity.
Develop a digital twin mechanism in Unity by building a piston-driven end effector to push a box evenly, avoiding rotation, with a rejector, a reject shaft, and a controlling script.
Import and attach the piston physics script, configure a kinematic rejecter with a rigid body and box collider, and test pushing a box toward a conveyor.
Fix a bug causing non-linear shaft movement by aligning centers and using a duplicated rejector as the linear target, then switch to fixed update for smooth motion.
Build and refine the second conveyor in Unity, adjust thickness and mass to prevent collisions, test the push and rejector, and finalize platform details in this digital twin production line.
Build the final platform under two conveyors in Unity, ensuring positive scale. Color and place components, copy sections, and reflect that this digital twin forms a mini production line.
Explore Cartesian robots, linear robots that move in 3D space and form the basis of pick-and-place, CNC, and 3D printers. Learn how stacked linear guides enable animation and physical interaction.
Explore a three axis Cartesian robot built from extrusion profiles, two motors, and a vacuum end effector used for 3D printing and pick and place.
Organize the Unity robotics project by creating x, y, and z axis script folders with slide, rotate, and control scripts, plus pivots, slides, switches, and axis sensors.
Create a y-axis pivot animation for the lead screw, motor coupler, and bearings in Unity, then attach a control script to synchronize rotation with slider speed.
Build and reposition the x axis pivot in Unity, attach bearing, leadscrew, and motor coupler, then adapt the y axis control into x control and test the x axis rotation.
Test and configure the z axis pivot in Unity by resetting x to zero and y and z to 90, then attach components and verify rotation before advancing to sliders.
Learn to implement a y-axis slide in Unity by grouping the carriage and note holder, wiring a y slide script with speed-controlled translation, and using limit switches.
Create an x axis slide to move the nut holder and carriage, then script and test sliding along x with rigidbody and collider, adjusting is trigger, gravity, and kinematic.
Learn to move slide components by passing carriage, pivot, and sensors as public game objects, then translate them collectively in fixed update to synchronize speeds across axes.
Attach the z axis to the x and y components and their sliders to enable movement along the z axis, and refine controls, sensors, pivots, and colliders for reliable collisions.
Run axis-by-axis and combined axis tests to spot bugs in the digital twin simulation. Use transform.position instead of translate for pivots to achieve global, stable motion.
Explore how to integrate a vacuum end effector with a Cartesian robot to perform pick-and-place tasks. Learn to digitally twin the vacuum end effector and simulate moving products between locations.
Explore attaching a vacuum end effector to a 3D pick-and-place machine in Unity, test movement in 3D space, and start scripting the pick-and-place routine.
Shows how to implement a vacuum end effector in Unity using a boolean pick toggle, collision detection with a pick and place tag, and proper rigidbody and collider setup.
Learn how to reference a collided object, track its position with the cup, and toggle rigidbody gravity and rotation to simulate a vacuum end effector in Unity.
Practice implementing on collision exit logic, clearing object references with null on release to prevent old object reuse, and reactivating gravity and rotation for realistic release behavior.
Learn how to tune a vacuum end effector for precise pick-and-place by applying a y-axis shift for alignment, calibrating object spacing, and stacking boxes in a mini assembly line.
Explore turntables in feeding systems, inspect a turntable model used in bottles production lines, and simulate rotational movements to optimize bottle filling and capping workflows.
Demonstrate a simplified turntable digital twin in Unity that uses pure physics to rotate a disc and guide bottles through barriers, teaching physical interactions and C# rotational movements.
Import assets into Unity by loading a provided project, organizing FBX models in assets folder, applying the 0.01 m per cm scale, and creating ground material for scripting and physics.
Prepare the scene by adding mesh colliders and rigid bodies, set the disk to kinematic, adjust gravity, and implement a z-axis rotation script in Unity.
Apply physical materials in Unity to improve motion realism for the turntable, disc, cylinder, and barrier; adjust weight and speed and create a generator to spawn and rotate jars.
Create an automatic spawner in Unity by scripting a spawner that instantiates a cylinder prefab at a defined coordinate with default rotation using a coroutine.
Debug spawners by exposing a public rotation vector and adjusting the spawned object's transform to set the rotation, ensuring new objects spawn with the correct orientation.
What is Digital Twinning?
In simple words, it's Creating a Mechanical Machine, and Simulating it, before even Building it to the Real World
It's all about Testing your Machine 3D Model, in a Physical Environment to see how it interacts with your Production Line Products.
All of this is Possible thanks to Unity!
You will learn how to Physically Simulate machines, and Animate them using Unity.
We will be digitally twin all the 3D Models from our course Robotics & Mechatronics II. But don't worry, If you never enrolled there, I'm still attaching ALL THE MODEL FILES!
Here is what we will be doing:
Learn the basics of Unity and C# (It's recommended that you have pre-knowledge in any C C++ JAVA C# or Python)
Digitally Twin a Conveyor Belt and Physically Interact with Product running over it.
Digitally Twinning a Cartesian Robot
Digitally Twinning a Pick & Place Machine
Digitally Twinning a Feeder Table (Turntable)
Digitally Twinning a Mini-Packaging Line
Digitally Twinning a Series of Conveyors passing Products
And more!
Where can I apply this?
Test Machines virtually before building them
Product Flow Overview simulations
3D Machine Commercial Presentation
In the World of Industrial Automation and Production Lines, this is probably one of the hottest topics.
There are very few people who can actually Digital Twin Machines from scratch without counting on External Pre-made Software, which could prove useless. Because you must learn to Digitally twin ANY MACHINE that your hands falls into, and never use a pre-digitally twinned one. Why? Simple, No two machines are alike .
In this course we will focus on Product Physical Interaction and Animation where In our previous course, Robotics & Mechatronics II, we focused on 3D Model Machines from Scratch, to be able to build any machine you have in mind.
This is the only course on the whole internet that focuses on This topic, from scratch, without forcing to pay thousands of dollars for Software Subscription, or for training.
I hope to see all there! and Please let me know if you have any questions.
This course, is a pre-request for Robotics & Mechatronics IV: PLC Virtual Commissioning (Coming Soon)