CharecterBody3d ignores inner Collisionshape3d (grandchildren)

Godot Version

4.2.2 2. 3.

Question

` I have player scene where it’s root is charectarbody3d, in this scene I’ve uploaded from blender mesh and animation with bones, all these works perfectly.
but for example, i have roll animation, u know u have to modify collision shape so it interacts with other obejcts in game, like reducing Y scale and for example increase X scale. the problem is :

  1. if i put collisionshape3d as direct child for charecterbody3d i can’t redirect it to where the animation goes, if normally collision points towards north, every side i do roll ( north / south / east / west ) collision is always pointing towards north
  2. if I use skeleton3d’s create pysical skeleton so collision shape points to where i want then all those collision shapes become like a ghost, the don’t collide with any object `
  3. if i try to make staticbody3d as a child for the node3d (where i can control mesh’s direction) and give it collisionshape, same problem as point 2 above.
    any solution ? :3

For who is interested, found an ugly solution for that (but eventually worked)
have nodes like that :

charecterbody3d →

---- node3d →
-------- staticbody3d →
------------ innerRoll collisionshape3d.

---- outerRoll collisionshape3d.

in this case as i explained in my question,

  • innerRoll will have the right transform for where to roll but it don’t collide with any object like a ghost - (disabled it’s collision under shape to avoid strange actions that might happen !!!)
  • outerRoll will do collide with objects but it always have the same transform everytime

solution : in your script where you want to active roll, add this line " outerRoll.global_transform = innerRoll.global_transform "

explnation : sinse outerRoll has always wrong transform but it collides, each frame (in func _physics_process(delta): ) u give it the correct transform from innerRoll.

hope that helped you if u r reading this :3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.