Mirroring a geometry

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

Mirroring a geometry

Postby icrls984 » Mon May 11, 2015 12:20 am

Hello! I haven't messed with Algodoo for a while, so I was wondering if there is a thyme command that will mirror a geometry?
eg. onCollide = (e)=>{mirror} or something like that.
.
User avatar
icrls984
 
Posts: 80
Joined: Thu Jun 13, 2013 6:33 am

Re: Mirroring a geometry

Postby Anbang11 » Sun May 17, 2015 12:22 pm

I don't know, but:
Code: Select all
e.this.angle = e.this.angle + math.pi
this thing will rotate an object 180 degree every time it's called, but slightly different from mirroring. (Highly unstable!)
Why would you wanted that?
When your computer has multiple cores but uses programs that only supports single core....
Image
That's Algodoo!
User avatar
Anbang11
 
Posts: 72
Joined: Sat May 09, 2015 7:46 am
Location: Earth.

Re: Mirroring a geometry

Postby Kilinich » Sun May 17, 2015 10:15 pm

nope. only re-creation with script
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: Mirroring a geometry

Postby icrls984 » Mon May 25, 2015 6:55 am

I know how to rotate an object, its not what I wanted, thanks anyway...
So to mirror an object I would have to completely re-create (spawn) it? I guess it isn't too hard, but I will have to make my script much longer I guess
.
User avatar
icrls984
 
Posts: 80
Joined: Thu Jun 13, 2013 6:33 am

Re: Mirroring a geometry

Postby FRA32 » Sat Aug 08, 2015 5:46 pm

I guess all you could do is inverting the points(as you are probably using polygons) of the shape into their negative counterparth in relation to the center. How exactly this works is out of my range of wisdom.
FRA32
 
Posts: 229
Joined: Wed Dec 03, 2014 9:51 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 17 guests

cron