Time for action – using OBJ files for the disks

Qt 3D doesn't provide a suitable mesh for the disks, but we can use a 3D modelling software to make any shape we want and then use it in our project. You will find the required OBJ files in the resources that come with the book. The files are named from disk0.obj to disk7.obj. If you want to practice with a 3D modelling software, you can prepare the files yourself.

Create a subdirectory named obj in your project directory and put the OBJ files there. Invoke the context menu of qml.qrc in the Qt Creator's project tree and select Add Existing Files. Add all OBJ files to the project. To put these files to work, we need to edit the Disk.qml file. Remove scale and rotation from the Transform component. ...

Get Game Programming using Qt 5 Beginner's Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.