switching entire model each frame

Hello all,

I’m having a hard time wrapping my head around a simple idea :

I have a photogrammetry model where a figure is walking.

So there are 7 models making up a walk cycle.

How can I cycle through these?

Thanks

~be

Just change the rendered mesh at runtime.

using UnityEngine;

[RequireComponent(typeof(MeshRenderer))]
public class MeshCycler : MonoBehaviour {
	public float fps = 8f;
	public Mesh[] meshes;

	MeshFilter meshFilter;

	void Awake() {
		meshFilter = GetComponent<MeshFilter> ();
	}

	void Update () {
		int index = ((int)(Time.time * fps)) % meshes.Length;
		meshFilter.sharedMesh = meshes [index];
	}
}

Is that what you want?

Hello.

I have been experimenting with this idea as well. I’m trying to animate multiple, different meshes ( in this case, an obj seq,) and I’m wondering if this is really optimal (for mobile.)

I understand there are Assets that can play obj seq’s (MegaCache, which I own) but i can’t seem to master .mtl libraries due to each obj having it’s own unique material.

I was able to animate each obj with the mesh renderer, but do you know if this is optimal?

Thanks!