E.Normal
8 posts • Page 1 of 1
Re: E.Normal
It seems to be that when you use a laser to find the normal of an object that the side of the object that you are hitting with the laser affects the normal of the object. Therefore, you're going to have to get used to it and make some work-arounds until they fix it. It's still useable, but be prepared to bend over backwards first.

-

Paradigm 29 - Posts: 284
- Joined: Tue Sep 01, 2009 12:06 am
- Location: Houston, Tx
Re: E.Normal
ok thanks anyway. I was just trying to make a Probe uses lasers but I couldn't get e.normal to work
<- Designed by PhysicsGuy-

xplane80 - Posts: 498
- Joined: Mon Aug 31, 2009 7:28 pm
Re: E.Normal
It's explained here
http://en.wikipedia.org/wiki/Surface_normal
so if you have an event and you call e.normal it will give you the normal vector. in algodoo the normal is in the wrong direction sometimes. you maybe can correct this by reloading the scene and it should work. if it's still in the wrong direction you have to use "(-1)*e.normal" instead of "e.normal" and it will work.
http://en.wikipedia.org/wiki/Surface_normal
so if you have an event and you call e.normal it will give you the normal vector. in algodoo the normal is in the wrong direction sometimes. you maybe can correct this by reloading the scene and it should work. if it's still in the wrong direction you have to use "(-1)*e.normal" instead of "e.normal" and it will work.

-

KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
Re: E.Normal
Could you please explain when the normal is wrong? I have tried to reproduce the flaw you are describing without success. Step by step instructions to how you got the bug would help a lot.
Algodoo Developer
- Joel
- Posts: 104
- Joined: Mon Aug 31, 2009 11:03 am
Re: E.Normal
The thing here is that that the surface normal indeed can be defined in two different ways, either relative to the first body or relative to the second body, and there is no real physical difference since contact forces in the end will be correct anyway since they have the corresponding definition.
This is usually very consistent, but it could happen that sometimes Algodoo reallocates its memory and changes order of bodies, and then the definition of e.normal might flip. My guess is that the flipping can occur when you save a scene to file and then reopen it again. Does it also happen at other times?
This should never affect any of the simulations, but I can imagine that it affects scripting (in fact, it can affect the simulation somewhat since changing order of bodies will give differences in the solver, and thus in the 4th or 5th decimal of forces, and that will indeed give some small differences). Perhaps you can use the direction of the normal contact force instead of e.normal in your script? (to be honest, I have to check if that is possible since I haven't used thyme for a while).
This is usually very consistent, but it could happen that sometimes Algodoo reallocates its memory and changes order of bodies, and then the definition of e.normal might flip. My guess is that the flipping can occur when you save a scene to file and then reopen it again. Does it also happen at other times?
This should never affect any of the simulations, but I can imagine that it affects scripting (in fact, it can affect the simulation somewhat since changing order of bodies will give differences in the solver, and thus in the 4th or 5th decimal of forces, and that will indeed give some small differences). Perhaps you can use the direction of the normal contact force instead of e.normal in your script? (to be honest, I have to check if that is possible since I haven't used thyme for a while).
-

admin - Site Admin
- Posts: 168
- Joined: Thu Jun 11, 2009 2:17 pm
Re: E.Normal
admin wrote:The thing here is that that the surface normal indeed can be defined in two different ways, either relative to the first body or relative to the second body, and there is no real physical difference since contact forces in the end will be correct anyway since they have the corresponding definition.
This is usually very consistent, but it could happen that sometimes Algodoo reallocates its memory and changes order of bodies, and then the definition of e.normal might flip. My guess is that the flipping can occur when you save a scene to file and then reopen it again. Does it also happen at other times?
This should never affect any of the simulations, but I can imagine that it affects scripting (in fact, it can affect the simulation somewhat since changing order of bodies will give differences in the solver, and thus in the 4th or 5th decimal of forces, and that will indeed give some small differences). Perhaps you can use the direction of the normal contact force instead of e.normal in your script? (to be honest, I have to check if that is possible since I haven't used thyme for a while).
That's good to know. BTW I fixed you spelling mistake.
-

standardtoaster - Posts: 606
- Joined: Mon Aug 31, 2009 7:57 pm
Re: E.Normal
admin wrote:there is no real physical difference since contact forces in the end will be correct anyway since they have the corresponding definition.
there is a difference with the direction of e.normal sometimes. for example if something gets values about its angle and reacts on this angles. with the wrong e.normal it reacts wrong because the angles are shifted about 180°.
if you want to watch/work on scenes in algodoo that were made in phun everything is screwed up if it's a different direction.

-

KarateBrot - Posts: 825
- Joined: Mon Aug 31, 2009 7:32 pm
- Location: Germany
8 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 7 guests



