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

Jetpack Compose: InteractionSources, Ripple, and You

eFootball 22 Mobile Delayed! What now?

eFootball 22 Mobile Delayed! What now?

C2X Station Upgrade Notice

Day53 of #100DaysOfCode

Show Device Administration Dialog in Android

How to run Android “App Crawler” testing tool

Highlight text search on RecycleView with Databinding and Kotlin Flow

Day54 of #100DaysOfCode

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

A Legacy of Driving Feminist Consciousness: Dr. Kumari Jayawardena

Union of Two Arrays

What to Expect — Bank of Canada Meeting

Arabic press review: Gulf sets conditions to resolve Lebanon crisis