Page 1 of 1

[SOLVED] model rotation in object definition

Posted: Mon May 25, 2015 4:13 pm
by Granamir
Hi everyone,
trying to make an object with an alcove, but unfortunatelly my model is turned 180° around Y (vertical) axis respect "surface" and "clickable" components.
So i tried to rotate the whole model in blender, to rotate whole model but node, to rotate node with GMT with no results (except occluder is fucked up and game crash if i use it...i'll fix it later).
So i'm wondering if there is a way to rotate model in object definition.
Anyone can help?
TY

Re: model rotation in object definition

Posted: Mon May 25, 2015 5:43 pm
by AdrTru
Try to take object with socket instead of surface.
Socket component have rotation vector.

Re: model rotation in object definition

Posted: Mon May 25, 2015 5:55 pm
by minmay
every component you mentioned supports the "rotation" field (you can also rotate them dynamically with Component:setRotationAngles())
AdrTru wrote:Try to take object with socket instead of surface.
Socket component have rotation vector.
that's pointless; SurfaceComponent supports rotation too!

Re: model rotation in object definition

Posted: Mon May 25, 2015 6:49 pm
by Granamir
TY, btw i don't know how to rotate them in object definition, i just do know how to rotate via in game script but i prefer to make a good object and after rotate it if i need.

Till now i solved partially my problem using altar surface (with "maxDistance") instead alcove, but i stil have problems with surface in lower elevation than object ( offset = vec(0, -x, 0) ); everything seems fine (copied definition from the one with surface above object elevation) except it doesn't take items.

Re: model rotation in object definition

Posted: Mon May 25, 2015 7:18 pm
by minmay
rotation = vec(x,y,z)

Code: Select all

{
  class = "Surface",
  rotation = vec(7,90,-6),
}

Re: model rotation in object definition

Posted: Mon May 25, 2015 7:40 pm
by Granamir
lol, so easy...don't know why i didn't try...
TY