2.5D Platformer — Pushing RigidBodies #7

Pushing boxes has never been easier

Is your Character Controller unable to move objects? Do not worry! It’s simpler than you think. You’ll just need to add a Rigidbody to your GameObjects you want to move.

If the Character Controller hits a GameObject with a Rigidbody, we’ll add a force to it which is the Character Controller move direction multiplied by a push power force. And that’s it! Really.

Oh, and to avoid funky behaviours with the object, try freezing the rotation. Or don’t. It’s your choice.




Junior Unity Developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Day54 of #100DaysOfCode

Day95 of #100DaysOfCode

Day71 of #100DaysOfCode

Carousel Slider — Flutter

How to develop your first Android App for free?

Jetpack Compose: InteractionSources, Ripple, and You

Make your Android application rock SOLID — Liskov Substitution

Highlight text search on RecycleView with Databinding and Kotlin Flow

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pablo Gómez Platón

Pablo Gómez Platón

Junior Unity Developer

More from Medium

The tale of Thunderbolt dock stations and multiple 4k monitors

Ecuador volcanoes part 2:

Networks of Desire

Node.js/Express RestAPIs — Angular 6 HttpClient — Get/Post/Put/Delete requests + Bootstrap 4