I am having issues with placing images attached to a body and I suspect this can be a bug of the editor:
Lets say I have this body which represents a car:
The position of the body is: 0.662346, 1.01895
If I set the cursor there --> setCursor(0.662346, 1.01895);
The cursor is placed properly:
Now have an image attached to that body. See it here:
I want to know where is the center of that image relative to the origin of coordinates!
Obviously, it is not the property center whose value is: 0.664493, -0.819155
If I place the cursor in that point:
setCursor(0.664493, -0.819155);
It is not the center of the image, obviously. I can see that maybe, the center of the image is RELATIVE to the position of the body the image is attached to. Let's try, I place the cursor in the body position + the center of the image:
setCursor(0.662346+0.664493, 1.01895-0.819155);
IT IS NOT THE CENTER OF THE IMAGE NEITHER!
This smells like a bug to me... I am using R.U.B.E for osx version 1.7.4 (paid version ofc).
How to get the Center of an image? [possible BUG?] [Images]
Re: How to get the Center of an image? [possible BUG?] [Imag
Ok, I have realized that the center of the image is relative to the body position and ROTATION.
The trick is to rotate the center of the image(point) as much as the body is rotated having as pivot the body position of the car.
Fuck, it wasn't that obvious
The trick is to rotate the center of the image(point) as much as the body is rotated having as pivot the body position of the car.
Fuck, it wasn't that obvious
Re: How to get the Center of an image? [possible BUG?] [Imag
Yes, images attached to a body need to be rotated and moved when the body moves. If you want to make manual changes like setting position coordinates directly, it will really help to set the angle of the body to zero first
By the way, you can set the position of the cursor to the current selection with the keyboard shortcut C, S (cursor to selection).
You can also open a dialog to manually set the position with the keyboard shortcut C, C. Keep the context help panel open to see all the keyboard options you have available at any given time.
By the way, you can set the position of the cursor to the current selection with the keyboard shortcut C, S (cursor to selection).
You can also open a dialog to manually set the position with the keyboard shortcut C, C. Keep the context help panel open to see all the keyboard options you have available at any given time.
Re: How to get the Center of an image? [possible BUG?] [Imag
Thanks for the tips! I didn't know about the shortcuts, they are really handy.
Is there a full documentation I can read with all those tips?
Is there a full documentation I can read with all those tips?
Re: How to get the Center of an image? [possible BUG?] [Imag
Well, the built-in help (open with F1 key) is the full documentation.
For example about the cursor, see the topic "Editing items" -> "The cursor".
You can also search for topics under the Search tab.
For example about the cursor, see the topic "Editing items" -> "The cursor".
You can also search for topics under the Search tab.