NWH Physics - Player not fitting in car, car starts spinning

HU$H

New member
Hello, I'm working with the NWH integration and running through the setup. I've gotten pretty far but I've hit a little snag im not sure where to go from here.

After following the setup instructions and testing the demos to ensure things are setup correctly, I set up my first car. Things seem to work as expected accept for when the user teleports into the car, he's not in the correct position, the controls don't work (I have setup the Input System integration, works in the demo with Nolan), and the car starts spinning around likely from the character position. I tested my character in the demo NWH scene and it does the same thing. The character works with your native car controller fine, using the car from your UCC demo. When integrating with NWH tho, I get this issue. If you have any suggestions for A) the position issue and B) the controller issue that would be amazing. Thank!

Screen Shot 2021-02-06 at 8.43.25 PM.png
 
The demo scene with Nolan works perfectly. Using a custom character in the demo scene has this positioning issue, and the controls don’t work.
 
Are you using the new input system integration? This is why NWH requires and may be what is causing the control issue. For the positioning make sure you have an Move Towards Location GameObject on the vehicle, along with the Move Towards ability on your character. You could also try comparing the Drive ability between the characters to see what is different.
 
Are you using the new input system integration?
Yes. I fixed the issue of not controlling the car by importing the SceneManager from the Opsive NWH Integration Demo (did not see this in NWH quickstart, must have missed it)

For the positioning make sure you have a Move Towards Location GameObject on the vehicle, along with the Move Towards ability on your character.
The Move Towards Location GameObject is not used with the demo scene because it uses Teleport Enter Exit mode. It seems the character goes invisible with this integration, in the Opsive demo scene as well, this is fine for now but would be nice to be able to see the character in the car.

You could also try comparing the Drive ability between the characters to see what is different.
I have set up my character with the Opsive NWH Integration Demo character settings, and I am testing in the Opsive NWH Demo Scene. The car still spins out of control like it is being influenced by some kind of random physics. All character physics match the Nolan NWH Demo character.

Would you recommend purchasing Eddy's Physics instead? Considering this to save spending so much time on vehicle integration startup. Would be great to see the character in the vehicle and be able to add passengers as well, if that is at all possible.
 
If you disable the collider on the character do the physics work correctly? From the perspective of the character controller the NWH and Edy's integration is the same so you may just have the same problems. For driving with passengers you'll need to create a new ability which allows the character to ride instead of drive.
 
I was having same issue, my issues was due to the ragdoll colliders which cause the vehicle physics to flip out. Just for testing i set the vehicle layer to IgnoreRaycast layer then in the physics settings in project settings, i set the ignorerecastlayer to not interact with the subcharacter layer since the ragdoll uses the subcaracter layer which solves it for me.

If you have radoll on your character then you have to set the vehicle layer to not interact with the ragdoll layer. Also if you want to see the character in the car uncheck "Disable Mesh Renderers" property in the drive ability
 
Last edited:
Top