Camera Follow

About advanced scenes, and the Thyme scripting language used in Algodoo.

Camera Follow

Postby Versieon » Mon Dec 21, 2009 1:28 am

Just a thought, is it possible to define in scipt which object the camera is to follow? That would be a big help.
User avatar
Versieon
 
Posts: 375
Joined: Tue Sep 01, 2009 4:45 pm

Re: Camera Follow

Postby KarateBrot » Mon Dec 21, 2009 1:54 am

Yes that's possible but you need to know the entityID of your object(s).

Code: Select all
(e) => { Scene.addBox({ entityID := 1; pos := e.pos; size := [1, 1] }); Scene.addGroup({name := "tracked"; entityIDs := [1] }) }
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Camera Follow

Postby niffirg1 » Thu Mar 04, 2010 3:31 am

Is there a way to stop following the spawned object without destroying it or adding a new object?
User avatar
niffirg1
 
Posts: 376
Joined: Mon Aug 31, 2009 10:31 pm
Location: The Great American South!

Re: Camera Follow

Postby KarateBrot » Thu Mar 04, 2010 3:48 am

Yeah, this should work
Code: Select all
Scene.addGroup({name := "tracked"; entityIDs := [] })
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest

cron