Physics, performance and mobile use case

batonPiotr

New member
Hi!

I am looking for an appropriate character controller for my mobile RPG. I am testing and comparing available character solutions on the asset store and this one (Ultimate Character Controller) looks very promising. All the features for melee and ranged combat are spot on.

I have few questions though:

1. My game supports tons of characters on one scene (~200 NPCs) and I'd like to have the ability to progressively throttle down simulation accuracy for performance reasons. For example: NPCs that are far away or are occluded do not need any animation updates but they should be able to update their positions. Or physics could be throttled down to the basics. Can I set characters properties in runtime so the computations are reduced to the absolute minimum when far away from camera?

2. I have crest and ceto ocean in my game with boats and ships on it. That means, they are dynamic rigidbodies and I want the characters to be able to get on them and walk on the deck as if they would be on a kinematic platform or terrain. Is it currently supported or on a roadmap?

3. I read on this forum and documentation about some implementation details and as I can see you have custom collision detection and physic integration to support determinism. It can be both a performance killer and a problem when interacting with physics. How does this character behave on swings, springs, suspension footbridges? Does it support such behaviours?

Here is an example for a bridge and few other interactions:
 
1. My game supports tons of characters on one scene (~200 NPCs) and I'd like to have the ability to progressively throttle down simulation accuracy for performance reasons. For example: NPCs that are far away or are occluded do not need any animation updates but they should be able to update their positions. Or physics could be throttled down to the basics. Can I set characters properties in runtime so the computations are reduced to the absolute minimum when far away from camera?
Yes, you can. For this it's easiest to use the state system to change the properties. There was a recent post that for hundreds of NPCs you'll want to use another asset such as GPU Instancer.

2. I have crest and ceto ocean in my game with boats and ships on it. That means, they are dynamic rigidbodies and I want the characters to be able to get on them and walk on the deck as if they would be on a kinematic platform or terrain. Is it currently supported or on a roadmap?
Right now the controller only supports kinematic rigidbodies. In version 2.2 (which will be released soon) you'll be able to use it with non-kinematic rigidbodies (such as the car in this post).

3. I read on this forum and documentation about some implementation details and as I can see you have custom collision detection and physic integration to support determinism. It can be both a performance killer and a problem when interacting with physics. How does this character behave on swings, springs, suspension footbridges? Does it support such behaviours?
The bridge shouldn't be a problem as the controller applies a downward force when on a rigidbody, and for the other interactions you'll want to use the ability system to allow for it.
 
Thanks for the quick response!

Yes, you can. For this it's easiest to use the state system to change the properties. There was a recent post that for hundreds of NPCs you'll want to use another asset such as GPU Instancer.
Ok, as I see, with the state system I can change properties at some circumstances. But are there any options to actually turn off some features on a character such IK, animator updates, physic or collision computation etc.?
 
But are there any options to actually turn off some features on a character such IK, animator updates, physic or collision computation etc.?
For collision you can not do horizontal or vertical collision detection. IK and the animator go hand in hand and there are not any properties which prevent it from happening since those are driven by Unity. With the animator Unity has the option to not update it when it is out of scope.
 
Top