IkerCLoN
06-01-2008, 08:49 PM
Hi, guys! This might have been asked here, but I could not find a thread related to that. So my apologizes in advance if this has been asked before ;)
The thing is that I'm starting to dive into technical things very unknown for me (it's nice to battle challenges that are quite impossible!). So I'm trying to get some real time dynamics in MAX using the Verlet Integration algorithms. For achieving that, I need to reference the object previous position in the script controller of that object, and as you all may know that provoques a 'illegal self reference' error message.
I decided to go other way: two points, one is the driver (P1), the other is the driven (with the script controller on it, P2). Another point is position-constrained to the driven (P3), and an expose-transform measures the distance between P1 and P3, and uses this distance for the script controller in P2.
So if you have arrived here (I hope I'm explaining this as clear as it should be), you should know that when I run the script, the behaviour that is supposed to take P2... is beeing passed to P3! And P2 decides to go for an offset walk (double transform)... but the system, although in a crappy way... well, it works :)
So after this long and boring explanation, I think that if I could reference the position of P2 under its script controller, everything would be better. And since it does not seem to work in a direct way, can you point me to some workaround or way to do this? It'd be very appreciated :)
I'll post a video as soon as possible.
The thing is that I'm starting to dive into technical things very unknown for me (it's nice to battle challenges that are quite impossible!). So I'm trying to get some real time dynamics in MAX using the Verlet Integration algorithms. For achieving that, I need to reference the object previous position in the script controller of that object, and as you all may know that provoques a 'illegal self reference' error message.
I decided to go other way: two points, one is the driver (P1), the other is the driven (with the script controller on it, P2). Another point is position-constrained to the driven (P3), and an expose-transform measures the distance between P1 and P3, and uses this distance for the script controller in P2.
So if you have arrived here (I hope I'm explaining this as clear as it should be), you should know that when I run the script, the behaviour that is supposed to take P2... is beeing passed to P3! And P2 decides to go for an offset walk (double transform)... but the system, although in a crappy way... well, it works :)
So after this long and boring explanation, I think that if I could reference the position of P2 under its script controller, everything would be better. And since it does not seem to work in a direct way, can you point me to some workaround or way to do this? It'd be very appreciated :)
I'll post a video as soon as possible.
