K2 SHEET A4 PAPER

BUY K2 LIQUID SPRAY ONLINE. “K2 SHEET A4 PAPER” is published by Donaldmichelle.

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Different Enemy Movement Part 1

Objective:

I want to Implement a zigzag movement on the enemy and we can do this by using a sine wave.

A sine Wave is a waveform that represents periodic oscillations in which the amplitude of displacement at each point is proportional to the sine of the phase angle of the displacement and that is visualized as a sine curve.

What we are going to do is flip the Sine Wave vertically

Create 2 Vector3 variables to hold the transform.position(position of the enemy) and the axis we want to initiate the waves on.

create a float variable to hold the frequency which is how many waves per cycle(the lower the number fewer waves are produced )

Create a float variable for the amplitude which is the min and max width of the boundaries

A float variable to hold the time it will take to complete the cycles

In the Void Start() method set the values to simulate the movement parameters

Multiply the enemy’s current position by the new speed and Time.deltaTime to acquire our new movement.

Call the enemy movement in the Updated method

Add a comment

Related posts:

Business Lessons from Season 1 of Arrested Development

First airing in 2003, the TV series Arrested Development is as comical as it is heartwarming. As I recently watched the show on Netflix, I couldn’t help but notice how many legitimate business…

How to Prepare for Data Conversions

With the release of FileMaker 17, the time to start prepping for data conversions is now! Luckily, with FileMaker Pro 7–14, by simply opening those files on FileMaker 17, you can automatically…

How to win Success for your Business

For you as a salesman, business or company, to be noted these days, Despite the fact that concurrence has tripled in the last 10 years in every niche, is to be original, however, the term…