Convert Throwing into Shooting

21/5/2020

I make some changes on the throwing function, so that it likes shooting instead of throwing. When apply into our shooting task, the bullet was not going to explode when it collides with the object.

To fix this problem, I add the collusion detection of the bullet. When the bullet collide with object, it will disappear.

And I add the explosion effect when the bullet is collide with other objects.

Apply Throwing Function on Player

15/5/2020

I apply the throwing function on player, and it works with little problem.

Since the path is parent to the character, the sphere will update the throwing direction along to the latest path position. It makes thing comes weird.

I fix the problem by temperately remove the parent relationship between the character and the path when the player release mouse button. The path will parent to the character again only if the sphere is successfully throw out.

Throwing Object – Path Creator

7/5/2020

As we want to make a mini shooting task inside our game, I am trying to using path creator to create few path for the shooting. The green line indicate the location of the path.

Player can throw the sphere by clicking the mouse. The throwing power is determined by the charging power which is controlled by the pressing time of the mouse. The longer pressing time, the farther throwing path.

Automatically React to Specified Object

1/5/2020

The next step is to build the auto action script to the slime so that it can affect the surrounding object instead of waiting player to trigger it.

I build a simple demo about the function:

  • Slime will inhaling the surrounding object that is marked as ‘Food’
  • The inhaled object will be destroyed after a while

But I find a problem during the development process. The initial rotation of the slime seems not correct, therefore I add an empty game object as a reference to the slime to make the slime can work as expected.

before
after

Grabbing Mega-Fiers Animation Information

21/4/2020

I would like to talk about the follow-up enhancement of the pervious post.

The function I made last time cannot grab the clip information from the children “ObjectPCAnim" script. It means I need to always check what clips is included inside the Mega-Fiers animator manually which is such an inconvenient thing for a programmer.

Therefore, I figure out why it happened and I make a little adjustment on the function to make sure the clip information are always grabbed before using.

before
after

The different between them is just placing under different function.

Apply Slime Animation Depends on Player Action

18/4/2020

I am trying to add the Slime reaction to player’s action in order to create the feel of interacting with the slime.

To achieve it, I have to make sure all part of slime must run the animation at the same time.

The are 3 components inside a slime.

In this test, I add the following customised script called “ObjectPCAnim" to each component so that I can take out the information from Mega-Fiers script and control the current playing clip of Mega-Fiers animator.

After that, I create a new class that helps me to control the above script of each component at one time.

The simple slime action controller is finished. I can apply it on the interaction with player by adding the collision detection.

And I get the following result:

  1. Slime will open its mouth when player is around it
  2. Slime will eat player when player inside its body

Slime Material Fixing

13/4/2020

The eye material of the slime has some problem. It will only show on other side. It is a simple bug that can be fixed by setting the material as ‘two-side’. However, I don’t know this method before today. Therefore, I spend lots of time to reimport the animation file to the Mega-Fiers point cache animation controller because I thought this situation is caused by the incomplete animation importation.

Vector Animation Test with Mega-Fiers

7/4/2020

Slime, a shapeless liquid object, is hard to simulate its action by adding bones to the model. In order to make the slime movement looks more natural, we export the animation into .mc file and control the animation in the Unity with the help of Mega-Fiers.

I do some basic testing of Mega-Fiers to see how I can use it to control the slime animation. I split the animation into few clip, so that I can call the desired animation according to the slime action.

Improving Camera Rotation

1/4/2020

I want to give one more chance to camera rotation method 2 – rotation camera according to mouse position. Therefore, I tried to improve the method by adding some speed adjustment based on the current mouse position.

When mouse cursor is more near to the inlier boundary, the rotation speed will be slow down. And the rotation speed will be increased if if is more near to the outer boundary.

However, this method is still not welcomed by our testers.

before
after