I’m currently making a VR game and part of the game I want to be able to grab a shopping cart and use it as a vehicle. I sort of have it working right now but not in a way I really want. This is basically how it works:
[video]Just Recycle Cans Test Video - YouTube
You walk up to the cart, grab the handle and the player actor gets attached to the cart and the cart can move around. My issue is that I based the cart off the character class which has to have a capsule component as the root. I did that because character has character movement which is an easy way to move the cart around. Only the capsule component seems to be used as collision for static objects when the cart moves around which means it can drive halfway into walls before finally hitting the capsule component and stopping. This obviously isn’t ideal.
It’s not really a traditional kind of vehicle. You don’t get into it, you just grab onto it and move it around, so I’m not entirely sure how to go about properly implementing it.
I suppose my question is what should I do to do what I want? Do I need to roll my own movement component that allows a box collision? Do I need to make the cart be an actual vehicle and then swap out the cart and player actor for a combined vehicle actor controlled by the player and then swap back when done with the cart? I’ve already wasted a lot of time trying to get this working when I would much rather work on the rest of my game. If anyone could give me an idea of which path I need to go down, that would be great.