simGetObjectPosition
-
- Posts: 16
- Joined: 09 Mar 2013, 18:10
simGetObjectPosition
The simGet ObjectPosition give really WRONG coordinates. I ask for the position of an object that is static and ALWAYS in the same place and in every second we give me different coordenates. very weird....
Re: simGetObjectPosition
Please post some code, otherwise it is impossible to say what is going wrong ;)
Cheers
Cheers
-
- Posts: 16
- Joined: 09 Mar 2013, 18:10
Re: simGetObjectPosition
Code: Select all
esf=simGetObjectHandle('Sphere')
PosEsf=simGetObjectPosition(esf,-1)
t=PosEsf[1]
simAddStatusbarMessage(t)
Did I do something wrong?
thanks
Re: simGetObjectPosition
The code looks ok. Very probably you are accessing the wrong object (e.g. not accessing sphere, but maybe sphere#1 which can also be accessed with simGetObjectHandle('sphere')!)
Make sure you understand how object handles are accessed in V-REP. This represents a powerful and convenient way to reuse the same code for copy-and-pasted child scripts, i.e. for copy-and-pasted objects and models.
Make sure to also read this post.
Cheers
Make sure you understand how object handles are accessed in V-REP. This represents a powerful and convenient way to reuse the same code for copy-and-pasted child scripts, i.e. for copy-and-pasted objects and models.
Make sure to also read this post.
Cheers