Post anything here that does not fall into the other topic categories.

Bonemerging/ attatching items?

Bonemerging/ attatching items?

Postby EpiQuerty » 28 Dec 2015, 23:54

Hello, this is my first post here! Anyway, I've been designing an RPG that I plan to make in Skyline, but after messing around with the presets and editors to learn my way around the engine, I realized that the weapons and armor are part of the character models themselves. I'm wondering if you can attach items to bones in the character's skeleton (similar to this:https://developer.valvesoftware.com/wiki/Attachments) Thanks.
EpiQuerty
Skyline Novice
 
Posts: 3
Joined: 28 Dec 2015, 23:41
Skill: Great creative
Skill: 3D Modeller
Skill: Level Designer

Re: Bonemerging/ attatching items?

Postby CreativeOcclusion » 29 Dec 2015, 00:12

In the documentation look in the Scripting & Modules API under Classes/Class List/Bone...

Code: Select all
int bone::getHandle   (   int    entityID,
string    boneName
)      
This function is needed in order to retrieve the bone handle index for the anim.setBlendMaskEntry() and anim.getBlendMaskEntry().

Parameters
entityID   : The entity in the scene you wish to edit their bones.
boneName   : The bone name to get the orientation.
Returns
boneHandleID: This is the internal handle to the bone inside the engine.
The following is a Small Example on how to use this function:

function onInit(objID)
    boneHnd = bone.getHandle(obj, "Bip001_Head");
    bone.setBlendMaskEntry(obj, "myAnimation", boneHnd, 0.5); -- apply animation on this bone by 50% all the time.
end

This would be the code to get the integer handle that the engine stores the code in...You would then Place your object at the bones position...Then offset it at the position you want...I never tried it personally...The devs are on vacation at the moment...Solar Portal should be able to answer your question better when he returns...

OH!...Welcome to SkyLine....
Thanks, CreativeOcclusion
User avatar
CreativeOcclusion
Skyline Warrior
 
Posts: 366
Joined: 22 Jun 2015, 19:34
Location: Texas

Re: Bonemerging/ attatching items?

Postby EpiQuerty » 29 Dec 2015, 16:44

Thank you! I'll start experimenting with it as soon as I get my character rigged!
EpiQuerty
Skyline Novice
 
Posts: 3
Joined: 28 Dec 2015, 23:41
Skill: Great creative
Skill: 3D Modeller
Skill: Level Designer

Re: Bonemerging/ attatching items?

Postby SolarPortal » 30 Dec 2015, 16:14

Hi and welcome to the forums EpiQuerty :D

Sorry for not responding as we are currently on holiday as @CO has mentioned and still are but checking on the forums :)

To attach to bones this is a good method using the Bone ID, but when you have scriptable attachments, it becomes much harder. For instance, a torch with fire etc....

This post contains a script which does the same as an attachment, but there is no attach code as all attachment is; is a copy of position & orientation with slight parameter changes.

Here is the post:
Code: Select all
http://www.forum.aurasoft-skyline.co.uk/viewtopic.php?f=19&t=1128&p=5809&hilit=bone+attach#p5809


Thanks and we look forward to seeing your stuff :)
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: Bonemerging/ attatching items?

Postby TattieBoJangle » 09 Oct 2017, 14:52

Hi Bentjudges can you go into more detail as I'm not sure what you mean by "UnleashX " thanks
Case: CM Storm Trooper CPU: I7 5930k X99 Cooler: Noctua NH-D15 Graphics: Asus GTX 1080 Motherboard: Rampage Extreme V x99 Ram: RipJaws DDR4 3000mhz Storage: x2 SSD Crucial 500GB + x5 2TB Hdd PSU: Evga 1500w OS: Windows 10
User avatar
TattieBoJangle
Community Manager
Community Manager
 
Posts: 858
Joined: 26 Jan 2015, 00:15
Location: United Kingdom
Skill: 3D Modeller
Skill: 2D Artist
Skill: Level Designer
Skill: Great creative


Return to Misc

Who is online

Users browsing this forum: No registered users and 1 guest