Frustrating Code
1 post • Page 1 of 1
Frustrating Code
Hello, The following code have been very frustrating to me and I don't know if I'm just tired or if this is just impossible to do. So I've been trying to solve this, basically what I want it to do is to change the color of an object when it collides and then make it more transparent as the time pass. This just make it go black and not having a dynamic variable as a color. If you have fast eyes you can spot the the dynamic variable is applied and removed in ~two frames. Please help as this is really starting to get on my nerves.
Thanks for any kind of help.
- Code: Select all
(e)=>{
e.other.textureMatrix(8) == 1995 ? {
e.this.refractiveIndex == 1995 ? {
e.this.textScale = sim.time;
e.this.color = {[0, 0, 0, 1 - (sim.time - textScale)]}
} : {e.this.textScale = e.this.textScale + 2}
} : {};
e.other.textureMatrix(8) == 1995 ? {e.this.textScale = e.this.textScale + 1} : {}
}
Thanks for any kind of help.
-

Rideg - Posts: 948
- Joined: Tue Dec 15, 2009 5:17 pm
- Location: Östersund, Sweden
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests




