Vehicle sinks on game start

omniagames

New member
I am using the UCC on my humanoid character as well as a tank and I have a Drive and Driveable ability on each character object respectively, which I have customized from the Ride and Rideable abilities. I have mostly everything working but I cannot figure out how to get the tank from falling forever when I turn on "Use Gravity" in the UCC inspector.
I have Align to Ground checked. I have tried adding a Capsule Collider object with a capsule collider to the Colliders object within the prefab (see picture) as well as a BodyCollider which has a box collider, and neither seem to do anything.
I'm not sure if this is related or not, but when my character actually mounts the tank object, the tank sinks a little into the floor.

Any help is greatly appreciated. I have spun every wheel I could think of trying to fix this.Screen Shot 2019-01-02 at 11.46.47 PM.pngScreen Shot 2019-01-02 at 11.43.24 PM.pngScreen Shot 2019-01-02 at 11.43.57 PM.png
 
For a tank (or any vehicle) I recommend getting an asset that is dedicated to being a controller for that. The controller was designed for more organic objects and while I am sure with enough work you could get it working well with a tank it would take a lot of modifications to do properly. For starters a box collider is not supported - only capsule/sphere colliders for the main collider.
 
Ok, thank you. I was hoping I could get it to work for my vehicles because I like the abilities and state systems but oh well. Thanks anyway :D
 
So after kicking this around back and forth, it seems like the major reason that I shouldn't use the UCC for vehicles and controllable entities is because of how it handles physics, correct?
I've just been thinking and trying out different things and it seems there would be so much benefit to having it. For instance, the explosion ability already does damage to anything with the health attribute, but I cannot have something with a health attribute unless I also have the Locomotion component attached. Also, I really like being able to implement common movement type control schemes that I can easily apply to different vehicles. I'd also like to add the hover ability to certain vehicles, which it seems like the ability system would make this easier.
I do plan to use some other scripts for controls of tanks and hovercraft physics, but it seems like I can hook into that pretty easily from the movement-type scripts.
I would even be willing to share my code with you or anyone else if it could help contribute to the package. It does seem like it would be much more performant to turn certain things off for certain "characters/vehicles" though such as inventory or physics/movement altogether, but I'm not sure.
If there is another way to do this I would be willing to pursue that as well.

What I would really like to use with vehicles are these systems:
  • abilities
  • view types (camera control)
  • movement types
  • attribute system (health, shield, etc. & attribute monitor UI integration)
  • moving platforms / wall climb etc
  • effects
  • perspective monitor
Please let me know what you think and if there is any way that I could implement this. I've gone down several other avenues and at this point, it seems like I would just have to recreate all of these systems anyway, so it seems like it would be less work to just turn off whatever I don't need and still use UCC on just about anything that is controllable. Another point to this is once I set this up for multiplayer, I'm going to have to figure out how to track all of those properties and it would be easier for them to be more unified.
 
I do think that there is a lot there that you can use, but the actual character locomotion (and all of the abilities) were built with a humanoid in mind so you'd end up having to recreate a lot. If there's a vehicle asset on the store that you like the feel of it would probably be easier to just work on an integration for that.

To start with the locomotion component only supports capsule and sphere colliders so that's a limitation for the more non-organic structures. Wheels then move differently compared to feet so you'd need to redesign how the actual locomotion system actually moves as well.
 
Would you be able to point me towards Docs or anything that would help me figure out the best way to use the parts of UCC that I want without the other parts?
 
Top