I want to animate mobs more dynamically

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

I want to animate mobs more dynamically

by burli » Sun May 22, 2016 14:56

I want to make better animation for mobs, for example turning the head independently from the body and make rotation smoother.

Currently mobs are static. They can move arms, legs or heads only on predefined animations by Blender. I want to be able for example to rotate a head from the script.

And I want to make animations smoother. Currently a mob did not rotate, he is just set to the new direction.

Is this possible with the current engine? And how does it work? If not, what has to be changed?
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: I want to animate mobs more dynamically

by burli » Sun May 22, 2016 18:04

I have two ideas. I can use the same methods like the playeranim mod, but I think this will cause lags.

The other idea is to split body and head. The body can be animated with keyframes like now. The head can be attached to the body with set_attach()
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: I want to animate mobs more dynamically

by azekill_DIABLO » Mon May 23, 2016 18:29

set_attach() does lag and bugs... will the head will be the player and the body follows??

the head might sometimes float in air...

but anyways, great idea!
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: I want to animate mobs more dynamically

by burli » Mon May 23, 2016 18:43

No, body would be the player/mob. Body should play normal keyframe animations. Head should follow and yaw will set by script
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: I want to animate mobs more dynamically

by azekill_DIABLO » Tue May 24, 2016 09:25

but that mean the head would turn instead of the body no?may be hard to do... but it's interesting ! i'm thinking to do a WoT subgame with tanks with turets turning...
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: I want to animate mobs more dynamically

by burli » Tue May 24, 2016 09:44

azekill_DIABLO wrote:but that mean the head would turn instead of the body no?may be hard to do... but it's interesting ! i'm thinking to do a WoT subgame with tanks with turets turning...

No, the body is moved/rotated by the "AI". The positition of the head follows because he is attached. I don't know if the rotation is also applied automatically to the attached object. If not this will be done by the script.

To let the head look left/right and up/down I will add a vector to the current direction
 

User avatar
Calinou
Moderator
 
Posts: 3157
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

Re: I want to animate mobs more dynamically

by Calinou » Wed May 25, 2016 18:19

Smooth rotation (interpolating entity/player rotations) needs to be done in the engine. It's been proposed for a while now.
 

User avatar
burli
Member
 
Posts: 1641
Joined: Fri Apr 10, 2015 13:18

Re: I want to animate mobs more dynamically

by burli » Wed May 25, 2016 18:37

I know, rotation in a script would be a bad hack. But minetest really needs better mobs, and smooth animations and a independent head are one step
 


Return to Modding Discussion



Who is online

Users browsing this forum: No registered users and 1 guest