Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 18 May 2003
Offline Last Active Jul 21 2015 08:46 AM

Posts I've Made

In Topic: What is your opinion about the Godot engine

05 June 2015 - 10:18 AM

Indeed it has a good 2D renderer. the 3d renderer is going to be reworked at some point, when Vulkan becomes widely available. It is a safe bet to learn it, but I think it is still far from Unity.

In Topic: show/hide window in Unity3d

03 June 2015 - 01:03 PM

My eyes are playing tricks with me. I have just compared it witha code with acorrect OnGUI, and I swear I saw OnGui.

In Topic: I don't understand how to switch animations in Unity. I use c#

25 May 2015 - 12:36 PM

There are a few tutorials that illustrate the use of mecanim, they are easy to underestand, even for newbies. The process involves creating an animation controller, and adding the animations. Then you set up the transitions between animations and variables. By setting a value in that variable, the animation controller triggers the corresponding transition from one animation  to another.

In Topic: Copying Skinned Mesh Renderer and bones from one GO to another in unity

12 May 2015 - 12:43 PM

I found the problem in my script: I was copying only the SkinnedMeshRenderer to see "if it worked", but it didnt.  I added bone copy and now I see the resulting character and it idle animation, but other animations give several errors: Quaternion To Matrix conversion failed because input Quaternion is invalid {-0.757474, 0.102703, -0.196973, 0.627736} l=1.017166

Here is the relevant (I think) code:

#region TransformCatalog
class TransformCatalog : Dictionary<string, Transform>
	#region Constructors
	public TransformCatalog(Transform transform)
	#region Catalog
	private void Catalog(Transform transform)
		Add(transform.name, transform);
		foreach (Transform child in transform)

#region DictionaryExtensions
class DictionaryExtensions
	public static TValue Find<TKey, TValue>(Dictionary<TKey, TValue> source, TKey key)
		TValue value;
		source.TryGetValue(key, out value);
		return value;

var boneCatalog = new TransformCatalog(me);
//repeat for each body part
GameObject prefab = Resources.Load("vmale-head") as GameObject;
GameObject tt2 = Instantiate (prefab);
head = new GameObject("head");
head.transform.SetParent( transform);
head.transform.localPosition = Vector3.zero;
head.transform.localRotation = Quaternion.Euler(Vector3.zero);
head.transform.localScale = transform.localScale;		
var skinnedMeshRenderers = tt2.GetComponentsInChildren<SkinnedMeshRenderer> ();
foreach (var sourceRenderer in skinnedMeshRenderers)
        var comp = head.AddComponent<SkinnedMeshRenderer>();
	comp.sharedMesh = sourceRenderer.sharedMesh;
	comp.materials = sourceRenderer.materials;
	comp.bones = TranslateTransforms(sourceRenderer.bones, boneCatalog);
Destroy (tt2);

I guess that Im missing more info that needs to be copied. The code is mostly based on the sample posted here.

In Topic: Godot Game Engine tutorial series

29 April 2015 - 07:31 AM

Tilemaps! Great, I really needed this one.