Animate object without crop

  • Hello everyone

    I've virtually got myself in a bit of a situation here (pun intended). I've got a set of images offseted by an "x" angle to create a "360" rotating object that I would like to place and animate it on my scene. I've looked at the following camera example. But it unfortunately uses a vertical image stripe and implements the crop method to dynamically transition through the set of images. However my images are a set of separete images and was wondering if there is an alternative where I can loop through and call each image named "001.jpg" "002.jpg".


    As you might have surely guessed... I'm a beginner, with a big heart and will to learn.


    Many thanks to anyone who can help shine some light onto this ! *thumbup*


    Alaa

  • So I've been messing with the code and was wondering if this is the right method to overcome my problem. I've decided to use the txtadd method to continuasly build a new url path each time but unfortunately my image isn't changing *cry* .

    I've attached the code for anyone to see:

    Code
    <hotspot name="vrobj_right" url="picture/name1.jpg" ath="0" atv="0" distorted="true" frame="1" lastframe="3" visible="false" onover="animate_right(); "  />
    		<action name="animate_right">		inc(frame,1,get(lastframe),1;  txtadd(url,'picture/name',get(frame),'.jpg'); 		delayedcall(0.1, animate_right() );	 </action>


    Any help is appreciated. Thanks y'all *wink*

  • Thank you Umalo (very insightful code *thumbsup* *thumbsup* ), I've managed to make it work. The 16 pictures are consecutevily being called to give a 360 rotating effect.


    Here is my code:

    Code
    <hotspot name="vrobj" url="pictures/N1-1.jpg"  width="50%" height="50%" ath="0" atv="0" distorted="true" index="1" lastindex="16"  visible="true"  zorder="1" onclick="animate();" />
    		<action name="animate">
    		inc(index,1,get(lastindex),1); 		txtadd(urll,'pictures/N1-',get(index),'.jpg'); 		set(hotspot[vrobj].url,get(urll));		showlog(); trace('url1 is at: ', get(urll));		delayedcall(0.1, animate_right() );
    						</action>
    		<hotspot name="vrobj_right" url="pictures/N1-2.jpg"  width="50%" height="50%" ath="0" atv="0" distorted="true"   visible="true" zorder="0"  />
    		<action name="animate_right">
    		inc(index,1,get(lastindex),1); 		txtadd(urlll,'pictures/N1-',get(index),'.jpg'); 		set(hotspot[vrobj_right].url,get(urlll));		showlog(); trace('url1 is at: ', get(urll));		delayedcall(0.1, animate() );		
    		</action>


    One teeeny tiny issue is that for some odd reason the sequence going from 4->4->5->5->6->6->7->7....

    I mean it's almost unnoticeable but irritating the OCD within me.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!