A simple example of a drivable car with a few configuration options.
How it works: The car attaches to the player and sets the player to be invisible.
Setup: Drop the “Drivable Car” template into you game and add the “playerCarScript” to your Player template. Change the configuration options to your liking. By default, interacting with the car will allow your player to “drive” it and hitting the interact button while driving allows your player to exit the car.
- The controllable mesh should have their “collisionPreset” property set to “Collide with All but Player”.
- If you’re using a mesh or voxel mesh with children, all of their “collisionPreset” properties need to also be set to this value (or you can use the “State Switcher Package” to toggle collision dynamically).
- The mantling and break fall player animations look glitchy on the car so you may want to disable those.
If you have questions or need help, find me (ekelrock) on the main Crayta discord.