Forum

Player Collisions with Surfaces

17 December 2016 02:36
Hi Blend4Web team,

Would someone be able to provide a tutorial or explanation of how to set up collision materials. It seems like no matter which combination of settings I use, my character is either floating above the surface or is sunk in the surface.

I have a player set as dynamic with collision bounds set to capsule (all scales are applied) floating above my ground surface. Seems no matter what I try he still floats.

On the ground I've tried physics enabled, static, special collision material even tried overriding collision bounds on B4W tool shelf.

On the other hand I have enemy characters and they are sunk into the ground. Same story tried all manner of settings on the player and the ground.

Could you provide the required settings for collision please!
18 December 2016 12:35
Hi!
Please check out the Firstperson demo (blender/tutorials/firstperson/firstperson.blend). There you'll find all the info you need.
22 December 2016 02:24
Thank you Alexander the Firstperson demo illustrates the problem precisely.
See attached image.. why is the 'character' floating above the ground.

I would be very grateful if you could tell me what settings are required to make the character collide precisely with the ground rather than always floating above it no matter what the settings are.
22 December 2016 14:14
Hello.

I would be very grateful if you could tell me what settings are required to make the character collide precisely with the ground rather than always floating above it no matter what the settings are.

Take a look at this ground material property
23 December 2016 03:39
Why would the character capsule be floating off the ground when using the default settings?
Doesn't make much sense.

Thanks for the suggestion but that doesn't work.
YourSuggestedSetting.PNG (no Change)

b4wCharacterOFF.png (turn off character checkbox in physics panel)
CharacterOnGround.PNG

The character checkbox on the physics panel has a bug or special requirements for settings that are not guessable.
b4wCharacterOn.PNG
CharacterOffGround.PNG

I've tried .01 .00000001 and many, many other combinations.
23 December 2016 17:26
The "Step Height" parameter is responsible for the character's elevation. If you reduce it to zero, the character will be as close to the ground as other physcal objects would with the same bounding. But generally, it is a bad idea to do like this, because the character will start to slide above the ground as friction starts working.

It is proposed that physical object is hidden and another model is used for rendering and animation.
 
Please register or log in to leave a reply.