Readable
5 posts • Page 1 of 1
Re: Readable
As much as I know, readable() enables accessing the readonly variables of something. So if you use readable(this), you get a version of this that allows reading values like geom0, layer, surfaces etc. It could be that my knowledge about this is not 100% correct tho since I can only learn from experimenting with stuff, and this is the most logical explanation for me.
- FRA32
- Posts: 227
- Joined: Wed Dec 03, 2014 9:51 pm
Re: Readable
Well, actually it makes a lot of sense now that I think of it. Thanks. Gotta get rid of some global variables then.
- Cathier
- Posts: 6
- Joined: Fri Sep 11, 2015 7:56 am
Re: Readable
Cathier wrote:So what does readable() actually do? Like, what's the function executed when calling readable()? What is its purpose?
It was added in early algodoo version as the only way to read pos, vel, angle and etc. After that in recent version direct read-write access to most properties was added, but some (like linked geom, impulse, surfaces) are still available only via readable() object.
Actually you could see all "readable" variables and values in entity's script menu under bottom line.
Dream of Algodoo as game development engine...
-
Kilinich - [Best bug reporter 2010]
- Posts: 2098
- Joined: Mon Aug 31, 2009 8:27 pm
- Location: South Russia
Re: Readable
Kilinich wrote:Cathier wrote:So what does readable() actually do? Like, what's the function executed when calling readable()? What is its purpose?
It was added in early algodoo version as the only way to read pos, vel, angle and etc. After that in recent version direct read-write access to most properties was added, but some (like linked geom, impulse, surfaces) are still available only via readable() object.
Actually you could see all "readable" variables and values in entity's script menu under bottom line.
Thanks! That opens a lot of possibilities for me now. I have a lot of uses for that.
Unfortunately, there doesn't seem to be an actual official documentation about algodoo's engine. It would help a lot of users including me.
- Cathier
- Posts: 6
- Joined: Fri Sep 11, 2015 7:56 am
5 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests