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:
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 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.
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?
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.
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 :)
Hello friend found something similar in the here is the link.. https://answers.unrealengine.com/questions/104207/vehicle-wheel-collision-problem.html
answered Sep 17 '16 at 01:48 PM
Hi, I've just posted a question here: https://answers.unrealengine.com/questions/528093/powered-wheelchair-need-help-to-start.html
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!
answered Nov 26 '16 at 07:05 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here