HomeGame EngineHow to Rotate and Move Pickup Objects Up and Down.

How to Rotate and Move Pickup Objects Up and Down.

Games are supposed to have a lot going on around the environment. You need to capture the minds of players. As a game maker, you should be an expert in distracting the player. Keep the players mind off the actual target, that’s exactly what makes the game more challenging for the player. How to Rotate and Move Pickup Objects Up and Down.

This Tech-Recipe is a brief introduction to adding general movement in the gameobjects. Since we are working on Roll a Ball, we will continue with it. To make the game more challenging, we will give the pickup objects some rotation and maybe some vertical movement.

Static pickup objects add a lot of monotony. And you do not want that in your game at all. You must have observed in video games that whenever you play the same level, you find the target in the same location. This makes the game easy for you.

It is always better to add randomness to game behavior. Large scale video games require the same spirit.

To add the rotator behavior in the pickup objects all you have to do is to write a simple script. In the script, you will add translation to the transform of the pickup. The pickup objects will now rotate.

Further to add vertical(up and down) movement, you can add the same script. To add randomness, you can use a random integer generator.

You can do the same using waypoints. Waypoints are used to move objects between points. But that is topi of another tech-recipe.

How to Rotate and Move Pickup Objects Up and Down.

1. Script to move it up and down.

2. Script to rotate

Checkout these Tech-Recipes

How to Pick Objects in Unity | Unity 3D Game Development

How to Move the Player in Unity | Force and Physics in Unity

Use Joints in Unity | Unity 3D Game Development

How to Use Material and Physics Material in Unity | Unity 3D

How to Use Lights and Cookies in Unity to Beautify the Scene (Part 2)

Add Trees and Windzones to Simulate Air in Unity

Joudet Ahsan
Joudet Ahsan
SEO Content Creator, a Computer Scientist in making and someone who sucks at writing bios.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

LATEST REVIEWS

Recent Comments

error: Content is protected !!