Posts: 41
Threads: 15
Joined: Jul 2012
Reputation:
0
Hi guys, How can i to get coordinates in center of an object? (The object is 3004 [pool cue])
Posts: 2,593
Threads: 34
Joined: Dec 2007
Posts: 734
Threads: 8
Joined: Jun 2009
Unfortunately running GetObjectPos on that specific object ID will return it's cue tip position, instead of the "center" position, so you will have to get the center pos by trial and error, AFAIK that cue stick is about a meter and a half long, so just add ±1,543 divided by 2* to either end of the stick to get position (relatively) in the middle of the pool cue.
* Got that number by measuring, it's not that "precise".
Edit: Use what Mauzen said, works precisely! You have to use trig to get the offsets right, though.
Posts: 1,241
Threads: 67
Joined: Dec 2013
Posts: 41
Threads: 15
Joined: Jul 2012
Reputation:
0
Problem solved! Thanks to all!