x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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.

Product Version: UE 4.11
Tags:
more ▼

asked Sep 16 '16 at 04:41 PM in Using UE4

avatar image

mwahlhuetter
6 1 2 3

avatar image A GUPTA Sep 16 '16 at 06:51 PM

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

avatar image mwahlhuetter Sep 16 '16 at 07:52 PM

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

avatar image A GUPTA Sep 17 '16 at 12:46 AM

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

avatar image A GUPTA Sep 17 '16 at 12:48 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

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

more ▼

answered Sep 16 '16 at 06:51 PM

avatar image

A GUPTA
4.1k 103 46 618

avatar image A GUPTA Sep 17 '16 at 12:22 AM

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.

avatar image A GUPTA Sep 17 '16 at 12:53 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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 :)

more ▼

answered Sep 17 '16 at 09:11 AM

avatar image

Surya Sel
16 1 2 2

avatar image mwahlhuetter Sep 17 '16 at 10:33 AM

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.

avatar image A GUPTA Sep 17 '16 at 10:42 AM

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

avatar image mwahlhuetter Sep 17 '16 at 11:11 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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

more ▼

answered Sep 17 '16 at 01:48 PM

avatar image

A GUPTA
4.1k 103 46 618

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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!

more ▼

answered Nov 26 '16 at 07:05 PM

avatar image

yuliia.sergeeva
1 1

avatar image mwahlhuetter Nov 28 '16 at 07:32 PM

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.

avatar image joeycampbell Mar 22 '17 at 04:22 PM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question