The place to post mesh,and animation related hints and problems.

animation mapper

animation mapper

Postby cassius_b » 08 Mar 2018, 21:16

Just taken a first look at the animation mapper. The default items seem to be related to some other mesh. How do I use it?
cassius_b
Skyline Ensen
 
Posts: 154
Joined: 21 Mar 2016, 13:45
Skill: 3D Modeller
Skill: Programmer

Re: animation mapper

Postby SolarPortal » 08 Mar 2018, 21:56

The animation mapper is as simple as mapping the animation name of the animated mesh you have selected to a name in the Mapper list.

So, the left side of the list is anim names that we can use in script to get the name of an animation. The cool thing about this is if you have 2 animated meshes, both with a walk anim called walk-00 or Walk_1 for example, these can be chosen on the animation mapper combobox item for the "Walk" mapped name.

Then in lua you can use this command and retrieve the name of the animation.
Code: Select all
WalkAnimationName = anim.getFromMap(objID, "Walk");
lprint("WalkAnimationName  = "..WalkAnimationName )
-- Prints either "walk-00" or "Walk_1" depending on which entity the script was called.


Hope this helps.. :D

Basically, it is a way to get an animation name from an entity that can be shared on a single script between multiple entities.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: animation mapper

Postby cassius_b » 08 Mar 2018, 22:07

Good. thanks. I am just about to venture into scripted anims.
cassius_b
Skyline Ensen
 
Posts: 154
Joined: 21 Mar 2016, 13:45
Skill: 3D Modeller
Skill: Programmer

Re: animation mapper

Postby SolarPortal » 08 Mar 2018, 22:11

no problem :)

Edit: Updated the code block as the getFromMap() functions takes 2 arguments.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer


Return to Mesh + Animation

Who is online

Users browsing this forum: No registered users and 3 guests

cron