Skyline Editor related tips n tricks!

Empty entity ?

Empty entity ?

Postby SpiderMack » 12 Nov 2017, 21:42

Hi,

I didn't find the "empty" entity.

It is common and usefull for example to make some parent game object that will contain sub objects like visible mesh or physics.

Is there a way to do it in Skyline ? Or must we wait for real prefabs and parenting functions ?


I have a character using navmesh script, but the character after import is not oriented in a way it looks at the player.

Image

The idea was to use a parent gameObject oriented by default and using the navmesh script , while we can set up in the editor the child object (mesh object) to the right Y rotation.



About Navmesh , does it have some function that will return if a destination can be reached or not because outside of navmesh ?
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Empty entity ?

Postby SolarPortal » 12 Nov 2017, 21:58

I didn't find the "empty" entity.

We use something called an empty node, which is acessible from the "RMB menu > Utilities" i think. It contains no rendering information but is a node that entities and other things can be attached to using the "Entity - Attach" action.

However, there is no need for the performance waste by adding it to another node or having to do that per scene or drag the preset as you can use the mesh editor and do it once. Simply rotate the mesh around the Y by 90 degrees so it faces a different axis. This works well on characters :) Skyline allows rotation and scaling of characters.
> Select entity
> Open mesh editor
> Click the second icon in to import the mesh select in the scene
> Character should appear in viewport
> In right panel in first tab, change the rotation angle to 90 or -90 depending on which way it needs to rotate.
> Set the rotation axis to 0 1 0
> The character should appear rotated.
> Now click the save button which should save directly over the mesh.(no need for the "save as" this time.)

About Navmesh , does it have some function that will return if a destination can be reached or not because outside of navmesh ?

hmm, if a position is grabbed outside of navmesh using the the navmesh function, then the position is moved to the closest point on navmesh. However, if a model is placed outside of navmesh, im not sure what happens, but no there is no function for that.

If you mean if the character has reached a destination, then you can use navmesh.isDestinationReached, or somthing similar. Its in the Lua API
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3133
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Empty entity ?

Postby SpiderMack » 12 Nov 2017, 22:02

SolarPortal wrote:hmm, if a position is grabbed outside of navmesh using the the navmesh function, then the position is moved to the closest point on navmesh. However, if a model is placed outside of navmesh, im not sure what happens, but no there is no function for that.

If you mean if the character has reached a destination, then you can use navmesh.isDestinationReached, or somthing similar. Its in the Lua API.


I was meaning a function able to tell if a point is inside the navmesh or not, very usefull for many stuff.

For example AI character will wander with random offset around a position, each time AI gets a random position i need to check if that position is inside navmesh or not to move AI or wait next frame to get another random position.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Empty entity ?

Postby SolarPortal » 12 Nov 2017, 22:06

yeah, Skyline navmesh library automatically finds the closest point on navmesh and returns the position regardless when polled for saving all those times you need to find a position per frame.
However, it could be useful to know if a point is in the navmesh or not, but currently there is no way of using a command to know where a point is in navmesh or not yet.
Conceive, Quantify & Do!
Skyline Game Engine - Lead Developer.
Please provide as much information as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 3770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3133
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Empty entity ?

Postby SpiderMack » 12 Nov 2017, 22:10

SolarPortal wrote:yeah, Skyline navmesh library automatically finds the closest point on navmesh and returns the position regardless when polled for saving all those times you need to find a position per frame.
However, it could be useful to know if a point is in the navmesh or not, but currently there is no way of using a command to know where a point is in navmesh or not yet.


I think it must be existing in the Api and should be usefull.

Another cool feature is Navmesh.Raycast
Less expensive than Physic.Raycast and can be used in some situation to check if there is some obstacle in front of the player.
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter

Re: Empty entity ?

Postby SpiderMack » 12 Nov 2017, 22:49

I finally found there is Empty Entity on Left click menu : Utility :lol:
This can be usefull some times :)
User avatar
SpiderMack
Skyline Expert
 
Posts: 441
Joined: 02 Dec 2016, 09:15
Skill: Concept artist
Skill: 3D Modeller
Skill: Level Designer
Skill: Scripter


Return to Skyline Editor

Who is online

Users browsing this forum: No registered users and 1 guest