Create custom vehicle: wheelchair wheel collision

Hi, i’m really at a dead end right now. I’m stuck and have tried everything I know. I want to create a wheelchair for a little project im working on. So at first I set up my wheelchair mesh to work with the WheeledVehicle. I got that working but the problem here are the front tires. The front tires of a wheelchair can freely rotate 360 degrees depending on the current direction the wheelchair is going. I dont think that this is possible with the WheeledVehicle setup.

The next thing I did was setting up my own skeletal mesh:

Then I created constraints for the joints of the wheels and also the mount of the front wheels and imported the collision meshes for the wheels:

Finally I applied torque on the wheels to drive around and it works quite fine:

via GIPHY

The only disadvantage of this method is that the collision model of the tires are not really round and at higher speed the wheelchair starts bumping around and eventually falls over.

I also tried using linetrace and it works but what I get with this is a suspension like behaviour, what i dont need on a wheelchair.
I tried moving the wheelchair up with the result of the linetrace length(wheel radius) - vector length of the trace. But after some milliseconds after launching it just flies off.

I tried using spheres as collider for the wheels, but the problem is the collision goes way more far to the sides than the actual wheel and the front wheels get really wonky.

What I also tried was using just a box as a collider, but with this method I didn’t even got the wheelchair to move at first because it sticks to the ground, even with a physical material with no friction applied. Thats because of the mount of the front wheels, it moves a little bit in the locked directions when force is applied to the wheelchair. When I also lock the Z axis of the mount, the wheelchair can move around. But thats not a really good solution, also the wheelchair is far away from going straight in one direction.
With this I would have to animate the wheels according to the speed of the wheelchair and rotate the front wheels in the right direction manually.

If there is no other way I think I will have to take the last method. But there needs to be something I haven’t thought of or something I done wrong.

Is there a way I could get LineTrace working here in some way I want it?
Is this maybe possible with the WheeledVehicle if you rewrite something in the background?
Is it possible to create a perfectly round wheel collider, like unity has one?

Im not afraid of coding something in C++ if i need to. I was just playing around with blueprints until now.
Any help would be much appreciated because im banging my head against a wall right now.

1 Like

you can create collision meshes inside of blender if you know how to use blender .

Here is the link my friend … https://www.youtube.com/watch?v=zu-qcxA1ARk

the version of the wheelchair that you can see in the gif above i did create in blender, also I created the collision for the wheels in blender, just the body of the wheelchair is a multi convex I generated just for saving time…
the problem is when the wheels are rolling, the collision mesh is not round enough for driving fast

Most probably you have collision between the wheel chair and the wheels causing the jumps. You have to separate them somehow or remove the collision of the wheels.

for better help watch this vid https://www.youtube.com/watch?v=9gdmJIfuORk

also check the export(blender) and import settings(UE4)

Watch the 3ds max workflow here he removes the collisions and creates new collisions…https://www.youtube.com/watch?v=mPlVrq8wtSI

TL;DR Don’t make your own Wheel Collisions, use Vehicle Wheel Class for this.

Don’t bother to make your own collision for the wheel. Create two Blueprints of the Vehicle Wheel Class (provided outta-the-box), one for the front wheel, the other for the rear. Open this up and you’ll find various options to tweak the wheel the way you want it. For your above question, the relevant properties would be Steer Angle, Wheel Radius, Width as well as the Suspension settings. You might also want to disable ‘Dont Create Shape’ Option. Playing around with these (mostly) self-explanatory values will help you get your perfect wheel.

Once that’s done, open your Vehicle’s main Blueprint and navigate to VehicleMovement > Vehicle Setup > Wheel Setups. Here you can start adding wheels/tweak existing wheels to your vehicles. Just select your Wheel Class and the Bone you’d like to attach it to in the Mesh. Import your wheel meshes separately and attach those to the respective bones as well in the Components pane, and make sure the collision on these meshes are DISABLED. Playtesting will let you know the right value for Wheel Radius and Width.

Sorry for that wall o’ text, I just wanted to be as clear as possible. Also, check out the Vehicle Advanced Template for a similar implementation. Do let me know if it works out or if you’re having any trouble :slight_smile:

Thank you for answering, but I already created a wheelchair with the WheeledVehicle Blueprint, and everything worked!(I wrote that at the top)
But the out of the box provided wheeledvehicle does not fit my needs, because a wheelchair is not steered by the front wheels, its steered by how much one of the rear wheels turn. And the VehicleWheel class is just a data class that alone won’t provide me a collision if I don’t use it in combination with the WheeledVehicle I think. I also tried digging around in the c++ code of the vehicle to maybe find a way to just create a round collision but until now no luck.
Take a look a the gif under the second picture to see the version I created without the WheeledVehicle blueprint, so you know what I mean with the behaviour of the front wheels.

yes you are absolutely correct the torque is applied on the rear wheels

I mean I know that the physx vehicle uses 4 raycasts as suspensions and the actual wheel shape used for collision wih other things must not touch the drivable surface, and I also tried to recreate that. It worked but I dont know how to have the suspension on a fixed height. because I dont really need sunspension feature, the wheelchair should just “float” on the height of the radius of the wheels. If someone can tell me how to do this with a raycast, everything else is not a problem anymore.

Hello friend found something similar in the here is the link…
https://answers.unrealengine.com/questions/104207/vehicle-wheel-collision-problem.html

Hi, I’ve just posted a question here:

Do you mind to help me with a wheelchair setup? I see what you’ve done but due to pretty small experience with UE I’m not quite sure how to repeat that.

Thanks in advance!

Sure, I can help you. But only as far as I have come with my prototype. And I have not really worked at it for some time because of studying. I think I’ll have some time for helping you in 3 to 5 days.

Hi mwahlhuetter - any chance you could share a dropbox link to the wheelchair model. I am looking to apply wheel movement to an imported fbx model of a shopping trolley for a VR game. It would be great to use your file as a reference as I am unsure how to implement wheel animation that is synced up with the movement of the vehicle. Any help would be great.

I read your original question and all your replies, well written. I am in the exact same boat and was wondering what you ever figured out. I have tried so many ways to import custom collisions for the wheels of this dirt bike but at higher speeds they wheels start bouncing.

Maybe Epic could not fix this limitation and that is the reason they created their own custom wheeled vehicle.