Great, entertaining video! Mind if I ask you about step-up system? I've created a voxel world with rigidbody player and I'd like rigidbody to transfer position with Vector3 Lerp, when it meets a one ingame voxel tall block. I've used raycast, then boxraycast/colliderRaycast and even OnCollisionEnter and it still won't work. When rigidbody is going down the terrain it snaps perfect to the ground, but going up isn't working at all. Thanks for your time!
If the goal is to have the player automatically lerp up when approaching a step up, our first instinct would be use one low forward raycast to determine if there's an obstacle within a short distance, and one high forward raycast to determine if there's space above that obstacle, and trigger the lerping up if the high raycast doesn't hit anything at the same distance as the lower raycast.
@@xrterraclass I did this approach, the thing is when half of a player rigidbody is touching a stepup, it won't activate the lerp/snap. That's why I've tried boxRaycast and then OnCollisionEnter, which won't work for me at all. I'll try to debug code or try again with boxRaycast one higher than the other near the feets. Thanks for the reply tho!
Great, entertaining video! Mind if I ask you about step-up system? I've created a voxel world with rigidbody player and I'd like rigidbody to transfer position with Vector3 Lerp, when it meets a one ingame voxel tall block. I've used raycast, then boxraycast/colliderRaycast and even OnCollisionEnter and it still won't work. When rigidbody is going down the terrain it snaps perfect to the ground, but going up isn't working at all. Thanks for your time!
If the goal is to have the player automatically lerp up when approaching a step up, our first instinct would be use one low forward raycast to determine if there's an obstacle within a short distance, and one high forward raycast to determine if there's space above that obstacle, and trigger the lerping up if the high raycast doesn't hit anything at the same distance as the lower raycast.
@@xrterraclass I did this approach, the thing is when half of a player rigidbody is touching a stepup, it won't activate the lerp/snap. That's why I've tried boxRaycast and then OnCollisionEnter, which won't work for me at all. I'll try to debug code or try again with boxRaycast one higher than the other near the feets. Thanks for the reply tho!
You can also try Trigger Detection instead of Collision detection, which is the next video we released.