I want to animate mobs more dynamically

User avatar
burli
Member
 
Posts: 1313
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: 1313
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: 3458
Joined: Wed Oct 29, 2014 20:05
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!
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
burli
Member
 
Posts: 1313
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: 3458
Joined: Wed Oct 29, 2014 20:05
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...
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 

User avatar
burli
Member
 
Posts: 1313
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
Member
 
Posts: 3124
Joined: Mon Aug 01, 2011 14:26
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: 1313
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 4 guests

cron