Fixing Character On The Ground - Epic Wiki

# Fixing Character On The Ground

# Overview

Rate this Video:

5.00

(one vote)

Approved for Versions:4.8,4.9

This page provides a way to fix objects on the ground by a constraint-based approach, a way you can more strictly control your character.

# Tutorials

Suppose we have a cube floating in the air, and we want to fix it on the ground.

cube1

Firstly,let's create a new trace channel named "floor"; this can be done in the project setting.

trace channel

Then we can attach a blueprint to the cube

blueprint

Here we cast a ray from cube to a location far below the cube. Then the ray will collide with floor layer and return the information of the floor. Then we can get the location of the collision point. Then we set our cube's location to this point + the height of our object.

After finishing this, your object should attach to the ground now:

cube2

-ywj7931

Retrieved from "https://wiki.unrealengine.com/index.php?title=Fixing_Character_On_The_Ground&oldid=17204"

Category:

Hidden category: