How to get properties of collided object (mass, forces, id)?

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

How to get properties of collided object (mass, forces, id)?

Postby Cyberpunk » Thu Jan 18, 2018 6:07 am

Is it possible to track forces and masses of an object? The program allows you to see the vectors and values, but is it possible to access these values ​​programmatically?
Also i need to get the object mass via onCollide event and the id.
It is very difficult to obtain important information about objects
(Algodoo for Education v2.0.0)
Cyberpunk
 
Posts: 2
Joined: Thu Jan 18, 2018 5:52 am

Re: How to get properties of collided object (mass, forces, id)?

Postby Kilinich » Thu Jan 18, 2018 9:49 am

1) Update Algodoo to last version (2.1 and it's free)
2) Yes, all properties are accessible via scripting.
3) e.other.area * e.other.density in onCollide
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: How to get properties of collided object (mass, forces, id)?

Postby Cyberpunk » Thu Jan 18, 2018 12:09 pm

1) v2.1 doesn't work with an error": This system doesn't support shaders. Please update your graphics drivers and try again"

2) what about forces? E.g. Normal (N):
Image
Cyberpunk
 
Posts: 2
Joined: Thu Jan 18, 2018 5:52 am

Re: How to get properties of collided object (mass, forces, id)?

Postby Kilinich » Fri Jan 19, 2018 9:41 am

There is some ways to get forces:
1) Read it from hinges: viewtopic.php?f=13&t=10984&start=0
2) Calculate acceleration, add g force and multiply by mass
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


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests