Hello, I’m not sure this is the place to ask this as it’s more to do with collisions.
I have a mesh, that is rigged and animates and I am using the player controller for it. Which I realise has a capsule. I know I can’t change or remove it, so I tried to add something else. My character is a car, I didn’t use any vehicle blueprints or assets for it because I want limited function. I only want it to go in a straight line and to swerve, I have done this with the character pawn. But that has issues with the collision as the collision is on the capsule and the rest of the car model will go through things.
So I tried attaching all manner of things, from box collisions, to invisible static mesh objects, as child objects or dragging them onto it in the world outliner but the results are always the same.
Here’s an example of when I tried to add a box collision to it. Whether I left the collision section default or messed around in it, it didn’t do anything.
How do I get around the capsule collision and add in one that covers the mesh? I even went on the physics file and saw that it said disable collision by default was checked, unchecking that did nothing.
I’m pretty sure if it inherits from character, then you’re stuck with the capsule as a collision method.
Try making it as big as the car to test the theory.
If that’s the case, you have to write your own pawn I guess.
I did have a look at doing that, but there’s even less collision there. I kinda wish there was an option to ignore capsule inheritance, I just want it to follow along, not act like it.
Did you take a look at the vehicle project templates? I assume they tackle this there…
I have done, but I don’t quite know what that uses for collision. I think it uses the physics constraints? I notice there is no capsule component, because the pawn must be something different, so I’m not clear where that gets it’s collision from. In the blueprint I see it has a PhysMat in it’s collision. Well, phys material override it says. So does that use the boxes in the physics asset as collision?
If so, then maybe I have to make one from my physics asset? Unless I’m getting that wrong.
I’ll take a look at it thanks. I wish there was an option in the blueprint under collision that simply says “use mesh as collision” or something like that. Or a capsule override. Or just ignore inheritance, and have it follow the mesh and have it’s own collision.
I think I might have to just rebuild the character with a different pawn, which I have managed to do and it controls as I would like. But some functionality I’m stuck on. I followed a few tutorials on making menu’s and the like and where a “get player controller” or “get owning player pawn” is concerned I’m not sure what to replace them with. But I’ll keep looking as I can’t be doing with capsule pawn.
Figured that out, the pause menu and the speedometer work now that I’ve told those about the new pawn I’m controlling.
But I’m still having collision issues. Now there is no capsule I have no collision, even if I add one onto the pawn.
These vehicles uses a physics assets to handle the collision because it needs to setup the Vehicle Movement Component in the pawn.
So if you only want to create a collision, you could use a physics asset too and create a physics volume to your vehicle mesh. : )
And about creating a vehicle pawn like others templates and projects (including physics asset setup), there’s a unreal doc about this: Vehicles | Unreal Engine Documentation
Vehicle’s Physics Asset: Physics Asset (unrealengine.com)
I’m trying to avoid using actual vehicles. I have figured it out now anyway. I stopped using the character pawn and just remade a whole new pawn, and gave it a box collision as it’s root and now it has collision. Did what ClockworkOcean suggested earlier but made a root collision which I had missed before.
All I wanted the car to do was go forward and swerve. It’s not really a car at all in the way that games usually do them. However, full vehicle functionality is a good thing to know for whenever I’ll need it, thanks!. At the moment I’m making an incredibly arcady game.
The only real problem I have now, is that I have to use floatingpawnmovement. I’m not really sure why this is even a thing as I don’t want floaty controls, and I can’t find a different movement set to use. Seems a bit arbitrary to me to not allow another movement method for different pawns. I can’t seem to find a way to make the controls less floaty, I need them quick and snappy like how character movement used to be, I need to recreate that type of movement.
I would not use a character to simulate a car. They behave so differently.
If you really can’t use a vehicle, then build a new Pawn, and a Controller for that Pawn that can move the car around as you wish. Then you can set whatever collision you want on the car.
Note that all you may need is to turn “simulate physics” on on the main collision body, and then drive it with some forces. Perhaps a sphere in each corner (or around each wheel) to make sure that it can “glide” over somewhat rough terrain, too. The spheres don’t even need to be movable; they can just be glued to the chassis, as they don’t necessarily need to drive any animation.
I’m not really trying to emulate a car as such, just wanted something that looks like one and can only move forward and side to side, using strafing as swerving. Largely the controls for this do work, but the floating pawn movement is a bit tricky, but that is what I ended up doing. Making a new pawn and giving it it’s own collision. But for one thing I achieve, something else comes along and I don’t quite get it.
Like why is there not a charactermovement equivalent for a pawn? Howcome it’s floating pawn movement instead…why did they think anyone would want floating and nothing else? And is there a way to make floating pawn movement less floaty? Because now swerving is looser than I’d like it to be. You’re meant to be dodging cars and obstacles, I need the swerving to be tight and responsive.
Unless there is a way to use vehicle controls and completely disable all functionality aside from going forward and swerving…no gears, no turning, no turning around, no braking, no drifting, no rolling over, no reversing, no handbrake nothing but moving forwards and swerving.
And that’s kind of my issue right now. Using character movement has the wrong collision. And using a pawn has the wrong movement system. Each one has what I need, but the other half counter acts it. I need a pawn that would have the control of a character pawn, and the collision capabilities of a pawn that doesn’t use a capsule.
There are characters, for things that, you know, walk.
There are vehicles, for things that roll.
There are floating movement, for things that float.
I think that covers about 95% of all possible game objects. If you want something that’s more custom than this, you’ll write your own controller, because it’s probably specific to your particular game. They already have the Pawn/Controller/MovementComponent system, which does more than half of the heavy lifting anyway, and is pretty easy to extend.
If I could find out how to give the collision I want to the character pawn I would, because that movement system pretty much gave me what I wanted. That’s what my “car” does, it walks, exactly like I want it too. It’s a car in model only.
On a custom pawn I could only find floating movement, I don’t know why that’s all that’s available and there isn’t an equivalent walking one…seems arbitrary to me. Or at least I can’t find one. Another idea is to keep using floating pawn but reduce the amount of floatiness it has.
Although I am probably going to have to make my own anyway by the looks of it as you say.
Alright, so I went to ask on the other forums after this thread went in this direction, but they are read only for the moment. I’ll ask it again here as I think it is worded out better. I would edit the first post if I could.
"I’m a bit stuck on the whole movement component thing. I moved away from the default character pawn as the capsule collision for it didn’t fit my needs at all, and any added collision I gave it was ignored. So I made my own pawn but now, I can only give it a floating pawn movement component. Is there an equivalent character movement I can use? Or is there a way to make the floating movement much less floaty, or not floaty at all? Or is there a way to recreate the character movement on my new pawn?
I would if I could have gotten it to work, keep using the character pawn and it’s capsule collision if I could override it and give a collision that covers what I need as I did get the controls on that as I wanted them to be."
Well, it appears I have managed to stop the floatmovement being so floaty and slippery. I asked elsewhere about this too and someone suggested to use kinematic physics. So I gave it a go. I removed the floating movement component and made the physics kinematic on their suggestion, but I couldn’t figure out how to move it. So out of curiosity I placed the floating movement back in and noticed the slide was gone.
Then I ended up making it non kinematic again and the slide remained absent. Until it didn’t, I think it came back when I changed a Y axis value in the add movement input on the car blueprint, just to see if that did anything. Putting the value back didn’t do anything. So, I got rid of the floating movement, brought it back yet again and the slidiness has gone again.
I don’t quite understand it but that’s what went on. I don’t know if the slidiness will come back but without the slippery movement I can control the car pretty much exactly how it was with the old character movement in the old blueprint.