Wondering How to create non standard character (quadruped/spider-like) ?
seems CapsuleCollider is the only option, any suggestion?
Youâre allowed to use any convex collider shape in any orientation, so in simple cases you could use a horizontal capsule, or a long box, or a custom convex collider, etcâŚ
However in the case of horses, something fancier might be needed depending on the level of fidelity youâre looking for. I could imagine implementing these as two character capsules that are constrained with each other (one for front legs, one for back legs) so the horse can properly adjust its posture to terrain inclines or detect that thereâs no grounding for only the back legs for example. This is an untested idea though, and would surely require heavy customization
One more problem: After disabling the CC (SetCollisionDetectionActive(false), SetComponentEnabled(entity, false), RemoveComponent(entity)) I still had to remove the interpolation component RemoveComponent(entity) or else the âCC disabled, animating, not ragdollingâ character would jitter. Obviously this is a temporary solution ^^
We are making a horse game and I experimented with the concept of having two constrained capsule colliders last year using Rival. I ended up moving away from this approach because of the pandoraâs box of issues that will pop up once you make the horse physical. Trust me, it gets silly and annoying real fast.
We are now basing our horseâs movement on this talk
https://www.youtube.com/watch?v=8vtCqfFAjKQ
and Iâm planning on doing simple casts around the horse to get information to feed to the Forward Locomotion system.
So to put it simply. The horse moves using a custom kinematic horse movement controller but the player will be using Rival.
How is your ragdoll setup in this case? Is it still attached to the character entity with a Fixed Joint or something similar when the character is disabled?
In the case Iâm describing the npc sleeps, so itâs not ragdolling but animating. So the CC is disabled (so other people donât collide with the air and the CC doesnât push it out of the bed etc.), the animated GameObject part is playing an animation and the kinematic ragdoll parts follow the animated bones. Basically disabling KinematicCharacterBody does not stop the interpolation from messing with LocalTransform but (I guess) because itâs disabled it does not update the âprevious positionâ that the interpolation uses. And because I âteleportâ the npc into bed at the same time as disabling the CC, the âprevious positionâ it uses is grossly wrong.
Still having issues getting it to install this package. Ended up adding "com.unity.charactercontroller": "1.0.0-exp.2", to manifest.json to finally get it installed. Hopefully thatâll be resolved soon.
Hello,
Im not sure if I do something wrong but when installing com.unity.charactercontroller and com.unity.entities.graphics, iâm getting the following error:
````Library\PackageCache\com.unity.charactercontroller@1.0.0-exp.2\Unity.CharacterController\KinematicCharacterUtilities.cs(274,57): error CS0246: The type or namespace name âPropagateLocalToWorldâ could not be found (are you missing a using directive or an assembly reference?)```
Iâm using unity 2022.2.12f1
The following package been installed ( itâs a fresh install but)
I also tried to reinstall the packages ( entities, physics ) manually ( without specifying any specific version ) but no luck
I also followed CharacterControllerSamples/_Documentation/Tutorial/tutorial-setup.md at master ¡ Unity-Technologies/CharacterControllerSamples ¡ GitHub.
Thanks
edit: it seems that com.unity.charactercontroller does not work with com.unity.entities 1.0.0-pre.65.
By using the same version than in the samples it seems to work,
Yes. It seems Unity broke packages by not waiting to update them all together. Iâm not sure why. The latest Entities does in fact break their Character Controller package thanks to the sudden changes with Transforms (anyone know why this couldnât be just marked depreciated until a new solution was available??? Seems like something that could have been considered).
At any rate, I guess we wait for the CharacterController package to get its update, or make the changes manually.
Hello @philsa-unity
is there an update planned for the com.unity.charactercontroller package?
it is actually not compatible with 1.0.0-pre.65 entities.
error :
Library\PackageCache\com.unity.charactercontroller@1.0.0-exp.2\Unity.CharacterController\KinematicCharacterUtilities.cs(274,57): error CS0246: The type or namespace name âPropagateLocalToWorldâ could not be found (are you missing a using directive or an assembly reference?)
yup, an update is being prepared and should be ready very soon. The update will also fix issues raised by @MildlyInfuriating in previous replies in the thread:
- Characters now properly ignore collisions with other characters that have a non-collidable collider
- Disabling the KinematicCharacterBody properly disables character interpolation
Heads up: this update will involve a breaking change, but it should be fairly quick to fix in your projects. Essentially, all characters must now have a âCollideâ collision response instead of âRaise Trigger Eventsâ. And the default method to call for your characterâs âCanCollideWithHitâ needs to be changed
Iâll be posting back here once the update goes live
Hello @philsa-unity , do you know when it will be available ( more or less ) .
Thank you.
The 1.0.0-exp.4 update is live. This oneâs for Unity 2022.2.10f1 and above
Make sure to consult the âUpgrade Guideâ section of the changelog in order to address breaking changes:
https://docs.unity3d.com/Packages/com.unity.charactercontroller@1.0/changelog/CHANGELOG.html
The Samples were updated to latest package
Thanks so much @philsa-unity . You are so helpful!
amazing!!!
i really like the package and everything is super clear btw!
could you please change the name of the CharacterInterpolation component to a more dynamic name such as âInterpolationâ in the next release?
the interpolation functionality you implemented can be reused on many contexts such as projectile movement⌠and I prefer to use your implementation instead of having to reimplement mine to work in addition to yours or having to use the CharacterInterpolation component on contexts that have nothing to do with the character itself.
btw, you can also remove the interpolation feature from the package and add it to the samples.
Thanks again @philsa-unity
I think this mightâve worked prior to exp.4 (aside from the âcharacterâ name), but this latest release needs the interpolation job to check for an enabled character component.
I can see how this would be useful though. Iâll give it some thought
After Installing havok package in a project with character controller inside, I get this error :
Library\PackageCache\com.unity.charactercontroller@1.0.0-exp.4\Unity.CharacterController\DisableCharacterDynamicPairsSystem.cs(66,57): error CS0246: The type or namespace name 'IBodyPairsJob' could not be found (are you missing a using directive or an assembly reference?)
Just noticed this issue as well; it happens when the Havok package is in the project. A quick temporary fix is to copy the character package locally and add Unity.Havok to the âUnity.CharacterController.asmdefâ dependencies, but Iâll be releasing a patch for this ASAP
The 1.0.0-exp.5 update is live
This fixes the âIBodyPairsJobâ error when using Havok
I just upgraded to the latest release, set the collider to collide, and the collisions work as expected, but trigger events arenât triggered anymore.
Is there any setting that needs to be enabled so that the Character collider will get detected by other physics objects with 'RaiseTriggerEvents` flags set?