View Full Version : obj.getPosition(time) vs. obj.getWorldPosition(time)

09-01-2004, 06:27 PM
I was perusing the LScript documentation and ran across these Methods in the Object Agent Reference Volume-I (p.98). I'm sure that other LScripters besides myself would appreciate an explaination of the difference between these methods when used with a mesh-object. :cool:

I'm imagining it's to do with relative coordinates vs absolute coordinates but would love to give someone more experienced the chance to expound in more depth.

Any takers? :cool:

09-02-2004, 12:46 AM
Here's a perfectly good explaination. (http://vbulletin.newtek.com/showthread.php?t=4095)

Now, I understand from some threads that an IA shouldn't use the process: ma to get or move an objects position via ma.set(POSITION,time);
Explaination was that you can't count on the ma being accurate.

so I coded:

create: obj {
objName = obj.name;
myObj = mesh(objName);

and I used: pos = myObj.getWorldCoordinates(time);

but how do I set the position after I modify the pos vector?
myObj.setWorldPosition & myObj.set seem be to the wrong answers. :rolleyes:

09-02-2004, 01:36 AM
Well Greg,

ma.set(POSITION, time); works fine for me! :cool:

09-02-2004, 03:33 AM
Poor greg's playing with himself!

09-02-2004, 06:52 AM
happens to those who spend too much time lscripting. trust me. :D

09-02-2004, 04:13 PM
hey, hey, hey.... no OT talk. We're trying to deal with serious Motion Script animation issues here! :p

"...did I hear something??? Is someone else in this forum???" :eek: