Axis rotation

Hi everyone!
Here is a question from a Unity new-bee, my first here! Exciting!

Is it possible to have the objects axis in the same rotation
in Unity as in Cinema 3D (9.5)?

If the z-axis (blue) is pointing “forward” in Cinema, they
points at the “back” when I export to Unity!

Have tried to export in all format…

I can rotate the axis in Cinema manually, but
I am converting a game from Director 3D to Unity, and to
do it for ALL the objects…!

Please help!

/errormaker

Thats got nothing to do with Unity or Cinema… and it cant be changed…
You always have to model the object extending its front toward you… z- axis, just like you read an xyz graph. Havent you wondered already why left / right and front / back is “not displayed correctly in cinema”, when modeling the front toward z+?
For this one simply turn the origin of your model, but doing this correctly from poly one on will give you correct display and behavior in both apps, besides saving you from lots of work…

Thanx for Your replay!
But, sorry, I dont get it. Probably too easy…

If I make a “box” in Cinema and export it to Unity
the objects axis are turned! (around the Y-axis; z-axis pointing the
opposite direction)…sigh…

“simply turn the origin of your model”
You mean, rotate the axis in Cinema?
Me stupid…

19770--639--$a1_350.jpg

I know what you mean… the problem is… your model has its backside pointing forward. Those axis you showed in your screenshot are just visual tools to work with… it doesnt matter in what direction they point… it got nothing to do with the models orientation.
What you have to care about is that the front of your model is located toward z- inside your modeling app… Thats all… So you have to turn the origin of your models 180° around y axis. This will not change the fact, that the axis tools are displayed different, but your model will face the right dirction and go forward when you say forward etc…

this is about left vs right handed coordinate systems. pretty common issue with 3d engines as they’re all over the board and not a lot you can do about it. sounds like you’ve got a load of assets you don’t want to have to edit (ie spin em around in cinema). you may have to. i don’t know if this will work or not. you might look at writing an editor script that rotates all objects locally in unity. this may give you problems with scripts as you may have to account for the rotation. i don’t know if there’s a way to reset the object once rotated.

Yes!
The problem is:
I have a game with 100+ object that must face the camera,
point at the camera all the time. Its a flightsim with balloons.
My “Rotate towards target”-script that points the objects is ok, but
the backside points towards the camera!
Why? The objects rotates when I export to Unity!

I could fix it in the script BUT I will understand/solve this
the right way!

Alpha-Loup:
" …you have to turn the origin of your models 180° around y axis…"
Do You mean, rotate the axis in Cinema?

I have search the Cinema manual for “Coordinate System”
and find this:

“FBX Export Settings
Coordinate system
Cinema 3D uses the left-handed Coordinate system. On export, the scene
will be converted to the right-handed system and the mech will be adapted
to take the differences between the coordinate systems into acount.”

Is this the answer? Nothing to do…!
It must be a way to solve this!

/errormaker

This is definitely a pain in the ass. I haven’t had a big issue with it like you have, but it’s always confusing trying to get it rotated right before export.

Do You mean, rotate the axis in Cinema?

most likely yes. unless you can find an auto way to do it. but if you’re only trying to always face the camera with all, just make a script that always looks away from the camera. no?

[edit… ps… let us know if fbx fixes it!]

@errormaker

Yes, rotate the axis in cinema, manually or by script.

So, lets see if I get this right?!

• I built a model in Cinema (“…uses the left-handed Coordinate system”…)

• The FBX exporter shift the axis in the “conversion” to
“the right-handed system”

• The z-axis flip 180° because Unity uses the left-handed Coordinate system!!

Tell me this can not be true!
Tell me I am wrong here.
Please!

What about that nice integration, Unity <> Cinema!
/errormaker (confused)

An easy workaround is to just set the scale of the root transform:
x = -1, y = 1, z=-1

You have to do this only for the root transform, and it will make it match the axes exactly like in cinema 4d.

OK, tried it, and its working.

But, this solution is not so easy to find or discover yourself.

There should be an checkbox in the FBX exporter
in Cinema or an import option in Unity… or something similar.
A more visual solution, more in the line of Unity itself…

Is it true that the FBX exporter do this “left-right-handed conversion”
the “wrong” way for Unity?

A mean:
Cinema - left-handed Coordinate system
Unity - left-handed Coordinate system
FBX exporter - convert to right-handed Coordinate system…

Is it? If so, why?

/errormaker

if so, it’s not something otee had control over. whoever wrote the fbx exporter you’re using wrote it right handed. :roll:

Maybe so… but…

This is from the " Importing Objects From Cinema 4D" online manual:

“Behind the import process (Advanced)
When Unity imports a Cinema 4D file it will automatically install a Cinema 4D plugin and launch Cinema 4D in the background. Unity then communicates with Cinema 4D to convert the .C4D file into a format Unity can read…” (FBX)

It seems to me that otee is quite involved in the
process of making this to work properly!

Sorry if I sounds angry… but this is that typical “small” problem
that can make me creasy!
In the future I think otee will fix this.

For now, I understand it (a little more), have a workaround
and… is just a calm and collected… person…

over and out
/errormaker

indeed… my apologies for being snippy :slight_smile:

Its OK! Back to making games! :slight_smile: