AnimatorSimple with meshs

All topics about ZGameEditor goes here.

Moderator: Moderators

Post Reply
airpas
Posts: 48
Joined: Wed Apr 18, 2012 11:50 am

AnimatorSimple with meshs

Post by airpas »

hi
how to target for example sphere mesh position in AnimatorSimple component ?

i tried sphere.Position.X but it says "invalid propname"
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Re: AnimatorSimple with meshs

Post by Kjell »

Hi airpas,
airpas wrote:how to target for example sphere mesh position in AnimatorSimple component ?
A Mesh component doesn't have a Position property. When you select a component from the Project Tree, the Properties panel shows you which properties the selected component has.

Image

A common way to move a Mesh is to use a Model component to render it ( a Model component does have a Position property ).

Image

Attached is the example seen in the screenshots ;)

K
Attachments
Sphere.zgeproj
(1.16 KiB) Downloaded 407 times
airpas
Posts: 48
Joined: Wed Apr 18, 2012 11:50 am

Post by airpas »

@Kjell thank you so much , this is really helps.
just 2 question :
1 - what does SpawnModel do exactly ?
2 - how to move an object through bezier spline path? for example camera

thanks in advance
User avatar
Kjell
Posts: 1883
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi airpas,
airpas wrote:what does SpawnModel do exactly?
SpawnModel either adds a Model to your scene ( when using Reference ), or a clone / instance of a Model ( when using Clone ).
airpas wrote:how to move an object through bezier spline path?
There's no Bezier Spline component build-in at the moment. You could do / solve this yourself, but you won't be able to import them ( from Maya / Blender etc. ), nor can you create your own editor interface ( like you can in Unity ), so it'll be a pain in the *ss to use. Regardless, attached is a ultra-basic example.

K
Attachments
Spline.zgeproj
Requires ZGameEditor 3.1 ( Beta )
(2.27 KiB) Downloaded 412 times
airpas
Posts: 48
Joined: Wed Apr 18, 2012 11:50 am

Post by airpas »

thanks kjell
it is simple and easy to use :)
idea : bezier spline points could be also stored in a file
Post Reply