Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently May 17th, 2024, 10:12 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Follow path speed
PostPosted: November 26th, 2014, 6:28 pm 
Offline

Joined: January 23rd, 2006, 2:57 pm
Posts: 55
Location: Belfast
Opus: 9.5
OS: Win 7
System: i7 8G ram
Hi Folks
I have been trying to vary the speed of an object following a path. I have used variables in the time parameter etc. but to no avail.
Any thoughts would be appreciated. Hopefully I'm not missing something too obvious.
Cheers
Paul


For this message paulj has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Follow path speed
PostPosted: November 27th, 2014, 1:56 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Add your Opus version to your profile > Top Right > User Control Panel

And including your publication type in the question may also be useful - Opus Pro (exe) or HTML5 or Flex.

If you're scripting, then the second parameter of time alters the speed, IE the longer the time (secs), the slow the object traverses the path.

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Follow path speed
PostPosted: November 27th, 2014, 5:46 pm 
Offline

Joined: January 23rd, 2006, 2:57 pm
Posts: 55
Location: Belfast
Opus: 9.5
OS: Win 7
System: i7 8G ram
Cheers Mack,
I have done that and it works fine but when I vary the time variable(while object is following path) no change of speed takes place. It works ok with the move command but I want the object to follow a crooked path. Outputting to HTML5.
Cheers
Paul


For this message paulj has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Follow path speed
PostPosted: November 30th, 2014, 8:54 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Paul,

If you are trying to call FollowPath once and change the time parameter whilst this single call is executing - then no, I don't think this is how Opus works. The function has to complete the segment of the path specified with start / finish over the given time.

In theory the answer is simple, as you'd simple call FollowPath numerous times with a small segment - IE start=0 and finish=1 and increment these values for each iteration. That way if the time parameter has changed the speed over the segment would change.

HTML5 is spanner in that idea because calling the FollowPath more than once requires that the wait parameter be true and HTML5 appears to ignore this - however, if you look at the Opus.js code - the function does take a callback once its complete and using that we can achieve the same concept.

It works by calling the FollowPath function with the last parameter as another function call to execute once the FollowPath is complete. This new function call, checks where on the path the object is and then increments the segment to travel if finish has not reached 100% and calls the function with FollowPath again.

</mack>


You do not have the required permissions to view the files attached to this post.

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Follow path speed
PostPosted: December 1st, 2014, 4:24 pm 
Offline

Joined: January 23rd, 2006, 2:57 pm
Posts: 55
Location: Belfast
Opus: 9.5
OS: Win 7
System: i7 8G ram
Cheers Mack but cant get it to run.


For this message paulj has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Follow path speed
PostPosted: December 1st, 2014, 5:09 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
As in can't load it into Opus or you can't get the published HTML5 files to run?

I've just downloaded the zip and checked and it seems fine.

Here's the output:

http://sandbox.interaktiv.co.uk/forum/path/

</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group