# 3d Object Rotation

### » Wed Dec 08, 2010 9:10 am

Ive spent last 15 minutes digging in forums but i cant find any explanation.
My question is: is it possible to rotate 3d object on Z axis? think: rotating planet.
this is quite crusial for me. i either figure out how to rotate an 3d object or ill be forced to make a animated sprite... which is a bad choice thinking how many frames itll need to make the rotation feel smoth.
B
29
S
8
G
7
Posts: 643
Reputation: 6,482

### » Wed Dec 08, 2010 12:06 pm

You have pitch, roll, or yaw, not sure what you mean by z, since that's the distance from the camera.
+ System: Always (every tick)
-> 3DObject: Set roll to 3DObject.Roll+1 degrees
B
175
S
50
G
199
Posts: 8,625
Reputation: 124,026

### » Wed Dec 08, 2010 12:09 pm

this.
B
29
S
8
G
7
Posts: 643
Reputation: 6,482

### » Wed Dec 08, 2010 12:38 pm

Any combination of pitch roll or yaw will do that.
Experiment till you get the speed right.
B
175
S
50
G
199
Posts: 8,625
Reputation: 124,026

### » Wed Dec 08, 2010 1:02 pm

[quote="newt":1nz40ex3]Any combination of pitch roll or yaw will do that.
Experiment till you get the speed right.[/quote:1nz40ex3]
well, i tried. and they didnt. from unknown reason Construct treats my model like a 2d sprite when pitching and yawing. so yes, it rotates it like a 2d sprite
B
29
S
8
G
7
Posts: 643
Reputation: 6,482

### » Wed Dec 08, 2010 1:43 pm

You have to set the depth of 3d object properly. Imagine it like a cube - by default it is thin, so it looks like a 2D sprite when it rotates. Set the depth to be equal to width and it'll be like equilateral cube
B
62
S
21
G
13
Posts: 1,910
Reputation: 13,685

### » Wed Dec 08, 2010 2:03 pm

aaah thanks guys. i knew the solution must be be somewhere in front of my nose but i couldnt see it.
Wiki dont even have "3D object" page and typing "3D object" in forum search engine told me to GTFO because its too common.

thank you. now its works perfectly

EDIT:
well, almost. Emmm.... anybody knows why the object migh not be visible in editor but BE visible ingame?
B
29
S
8
G
7
Posts: 643
Reputation: 6,482

### » Wed Dec 08, 2010 8:40 pm

It seems not all 3d modelers export to the same scale. If the model is so big that it goes past the camera, you might just see the inside of the model.
Check the import scale, and the eye distance.... you can go below 1 on import scale.
B
175
S
50
G
199
Posts: 8,625
Reputation: 124,026