Drive Ability not getting triggered

Mattis

Active member
hey!

Im using RCCV3 with UCC , the demo scene Car work with my character , but not my car I have made with UCC3 and set up like the demo scene car.. any ideas that I could check first?

Error: the character pickup truck (1) (UnityEngine.GameObject) doesn't have the Ultimate Character Locomotion component.
UnityEngine.Debug:LogError(Object)
Opsive.UltimateCharacterController.Camera.CameraController:Awake() (at Assets/Opsive/UltimateCharacterController/Scripts/Camera/CameraController.cs:209)

the demo car dont throw this error
 
Based off of that error it looks like you are setting the camera controller's character field to the truck which isn't supported. The camera can only follow UCC characters.
 
Okay, but I don't.. It's exactly the same as M3 demo car.. I manage to still get it to work even if the error is there.... But is there any update to this drive Ability? Its kind of hard to get it to look good.. and it's not playing the whole get in car animation? And the character never rotates like I want...always a new rotation when entering car.. And for the update loop,I guess I must use the state since update is a must with RCV3? Its now on fixed..
 
if I dont have the car anywhere tagged within the car game object or the parent as player the camera gets removed .. I have 2 RCC camera and maincamera..
 
You should be able to follow these steps to get it working:


I just did the same with a new project and it worked. You could try comparing your drive ability to that of the demo scene.
 
I got the rotation on entering vehicle to stop, it was in the animation clip settings, but how to actually get the character to enter the vehicle in the right place?
s
 
Everything about driving works, still get the error but it still works. And it's tagged as player like the demo car.. demo car no camera error but my car get the error... And it's tagged as the demo car..
 
Can you place a breakpoint within the setter for CameraController.Character? You can then use the call stack to see what is setting that property to the non-character transform.
 
I found the issue, UCC components was on the car cam because it was tagged maincam so they just went there at character setup... But this getting in position, are you guys going to improve that? with door animation and a bit more accurate entering car?
 
Glad you got it figured out. You'll need your own animations for entering the car - take a look at the Animator ID section for what parameters to look for:


RCC does not include any vehicles that have opening doors.
 
After this question I will mark this as solved... Abilities events... What if I mark drive ability and add an event that is reffering to a script "open car door" and execute it "On ability active event" ?
 
I also want to make a state where the character is in update insted of fixed update when the drive ability is in use... I tried to create a state on the drive ability but there was no update loop option in the state preset dropdown.
 
Take a look at the SkyCar for an example - the IDriveSource interface provides a callback in order to play your own door animation.

I tried to create a state on the drive ability but there was no update loop option in the state preset dropdown.
That's on the Ultimate Character Locomotion component.
 
Aah perfect I was looking for something just like that☺️ .. hmmm, the state update loop switch I don't understand, I recently made for the rifle to set hand weight to 0 when reloading, but I don't seem to figure it out how to do it with drive Ability ?
 
Top