Shapecast snaps at half way (Shapecast Weird Behaviour)

Godot Version

v4.4.1.stable.steam [49a5bc7b6]

Question

Im trying to do custom stair snap with shapecast’s, but get unexpected behaviour
The player scene goes like that:

CharacterBody3D
 CollisionShape3D
  ShapeCast3D

This will be hard to explain, but:
With step height set to 0.5 and cylinder shape, i have shapecast position set to Vector3..ZERO and target_position set to -Vector3.UP * step_height i expect shapecast to show where shape can be while “future” pos is inside shapecast itself, by that i mean it at least touching rest pos (position while no collision is detected), but when it less than half way to target pos, it shows that it can be exactly on it, when i dont expect it since there is still collider on the way, besides that, it detects collision when collisder is behind target position and does not intersects preview (debug)

Important notice, this doesnt seems to be only visual problem, since
get_closest_collision_*_fraction method will return 1.0 as it can pass through with no problem
Parenting shapecast to character_body does not solve the problem

Am i misunderstood something?

Everything as it should be, i just did a height cylinder shapecast with target pos with half height, so it snaps to the end because it cant be higher than “original pos”. My target pos is not far enough to capture all space i want, to fix that i can set position higher and make target_position lower.

I hope this video will explain to somebody who will find this post in future, how they actually work.

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