Walking on or in moving or stopped vehicle? Using blueprints?
Hello and thank you for your time, i apologize for any inconvenience that my post may cause, but ive come across a problem i need help with. I was wondering how i could get my character to walk around in a vehicle.. You know like on a trailer or inside the trailer of a semi-truck or rv whether it's being moved or not.. Because when I walk on a vehicle it bounces around a bit erratically and I have too much force on the vehicle and am able to move it easily while walking on it or into it. I greatly appreciate any insight on the matter!
asked Aug 18 '18 at 09:08 PM in Blueprint Scripting
What I would do is to have two different collisions in the vehicle, one would be the physics asset collision, this one would be simple and convex, just what you need to ride the vehicle, but inside the vehicle bp I would disable the collision reaction to the player, then also inside the bp I would make custom collision for the player to walk inside the vehicle, that should do it I think, because the player would be able to collide with the vehicle but not apply any force to it since the collision he is touching does not simulate physics and the vehicle collision itself does not answer to the player collision.
Though this is what I would do for the van, I have already tested another technique that works:
Add a physical material to the player capsule or to the vehicle collision (I tested it in the player), after that disable "Enable Physics Interaction" in the player movement component, this is a much simpler way of doing it and should work better, though it may have some side effects if you have other physics objects in your game.
Follow this question
Once you sign in you will be able to subscribe for any updates here