I have a question. I was under the impression that part’s with specified part types used regular topology based collision detection. Are they using something more accurate? For example is the ball using a ball collision algorithm or is it based on the ball’s geometry?
Pretty much all game engines have different collision detection and resolution algorithms for all primitive shapes. Spheres, cylinders, and capsules collisions are extremely fast to compute due to their round shapes, so it would make sense for Roblox to use these faster algorithms. This can be proven by raycasting onto a sphere and looking at the surface normals the raycast returns.
You can see that the point of intersection on a huge sphere isn’t actually on the mesh, because the mesh isn’t perfectly round like the actual collider itself.
In your client controller, hook up an event to UserInputService to listen for key presses. Be sure to disconnect it when the controller is stopped! Alternatively, you could check for key presses within the Update loop (but doing it via event is better).
If F is pressed, simply make the character jump. You can do this by setting the Humanoid’s Jump property to true.
Just a heads-up, I’m not sure if this is mentioned in the video, but in Roblox spheres work better than cylinders for wheels because the sharp edge of a cylinder can cause the wheel to oscillate rapidly from side to side at high speeds.
For people making cars in Roblox: If it is possible to use something like an invisible sphere as a bounding box for your wheel (in some cases it is, in some cases it isn’t), you should do it.
Additionally, do you use servos for steering? Still haven’t checked out the video, but on the topic of improvements, servos are pretty bad in general and rigid forces are almost always better. For example, AngularLimitsEnabled on a CylindricalConstraint, and setting both UpperAngle and LowerAngle to the same value.
That’s actually something I thought you might be doing, but didn’t mention in the post.
It’s effectively the same as using angular limits on a CylindricalConstraint. Works just as well, I definitely approve. For me, a property I can easily reset to 0 is easier to work with than an attachment that I modify.
Do you do it linearly, exponentially, or do you do it fancily and use a P(I)D controller? :3
I think my standard chassis system does it exponentially, but also allows you to specify a point for the wheels to target. See: