Home Artists Posts Import Register

Downloads

Content

Please find the project files for this tutorial attached.

Note due to limited attachment size on Patreon the Medieval Box asset files have been reomved. You can doenload them again from here - https://assetstore.unity.com/packages/3d/props/exterior/medieval-barrels-and-boxes-137474

Any questions or issues please let us know.

Thanks

Files

Push Obstacles Using a Character Controller (Unity Tutorial)

In this Unity tutorial we're going to look at how we can push obstacles around using a Character Controller and Unity’s physics system. We'll start by adding a box for the character to collide with. We'll add a Rigidbody component to it so that it reacts to physics, Next, we'll create a script to apply a force to the box every time the character collides with it. Then, for a bit of variety, we'll add a soccer ball for the character to kick around! The project files are available to our patrons here: ► https://www.patreon.com/posts/56046140 Want to follow along? This project is a good starting point ► https://www.patreon.com/posts/53286420 Help support our work: ► Patreon: https://www.patreon.com/ketragames ► Ko-fi: https://ko-fi.com/ketragames Follow us: ► Ketra Games: http://www.ketra-games.com ► Patreon: https://www.patreon.com/ketragames ► Twitter: https://twitter.com/ketragames ► Facebook: https://facebook.com/ketragames Introduction - 0:00 Adding a box to collide with - 0:36 Creating the push script - 2:02 Adding a soccer ball to kick - 04:39 Summary - 05:40 #KetraGames #LearnUnity #UnityTutorials #UnityTips

Comments

Anonymous

Is there a simple way to make the character "kick the ball" with some controlled velocity/force and direction?

ketragames

Hi, you could do this by checking if the ball is within a certain distance of the player. Then if the 'kick' button is pressed you could apply a force in the direction the player is facing. If you're trying to make a game where the player has the ball under control, you would probably want to set the parent of the ball to the player so that it changes direction with the player. Then when the 'kick' button is pressed you could apply the force in the forward direction of the player and set the parent of the ball to null. Hope that helps 😊