Physx 3 Character Kinematic X86. ~UPD~ 💠


Physx 3 Character Kinematic X86.

The only difference from the previous version is that we have included the KinematicBehavior that provides the user-friendly sliding functionality, allowing your character to move along its path easily, as if on wheels or on marbles. Here we included a configuration example using a PNG sprite.

“Collision”: The lack of a single collision object in this version also forces us to use the PhysicsBody::set_collision_mask method instead. “Impact”: The collision masks for all PhysicsBody instances are used to flag whether the user is hitting, walking across, or walking over the body. This feature allows us to perform sort of a “crossing” in a graphical manner, without need for any script code. The node is coded in such a way that the “crossing” (or collisions with) are handled by the PhysicsBodyWrapper implementation and called through its events, events that exist also for other behaviors. Default collision masks are assigned in the KinematicBehavior class, making it possible to modify them on any node without changing the behavior code.

It also doesn’t allow us to add rigid bodies in the “Motion” mode (e.g. walk speed, etc.), so to overcome this, we delved into the physics engine itself to create our own solution to create “character” body types using characteristics adapted to the Humanoid types. The default BodyType is Kinematic, and you can choose between a number of types in the “Motion” mode. You can also attach PhysicsAwerenering to a PhysicsBody node, making the physics engine immune to changes to collision masks. If, however, the body is kinematic, the collision masks won’t be modified by the PhysicsBodyWrapper, allowing user-defined masks for the body type to be used.

Finally, this version is the first version of the Physx3 character that truly implements the character controller scheme introduced in the PhysX3 SDK, including a control scheme to allow runtime adjustment of the character controller parameters (speed, stiffness, damping, etc.