Hi all,
Do known somebody how is structure for animations for chest components? ( used node )
open = "assets/animations/env/treasure_chest_open.fbx"
close = "assets/animations/env/treasure_chest_close.fbx"
I need use simmilar effect, but for smaller distance.
Thx for reply.
Request for chest party animation format
Request for chest party animation format
Last edited by AdrTru on Tue Mar 31, 2015 6:13 am, edited 1 time in total.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
MultiAlcoveManager, Toolbox, Graphic text,
Re: Request for animation format
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Request for animation format
Sorry for my bad description. This link I known.
I mean used node for party animation during chest effect.
I mean used node for party animation during chest effect.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
MultiAlcoveManager, Toolbox, Graphic text,
Re: Request for chest party animation format
You mean the camera animation? I think that's hardcoded in ChestComponent and is just done by modifying the party's transformation matrix (check it with party:getWorldRotation()). I certainly can't find anything in the animation files, and the camera animation still happens with different custom animations. If you want to imitate it, you can use party:getWorldRotation() to obtain the a transformation matrix. It's just an ordinary 4x4 transformation matrix with 4 fields named x,y,z,w that are each arrays with 4 elements. So for example, to set an object's transformation matrix to be rotated pi/2 radians on the X axis from rest position, you would do:
The table returned by getWorldRotation() seems to be a copy, and setWorldRotation() seems to copy its argument, so there is no need to copy them manually if you're using them for several purposes. Of course, in actual usage, you will want to multiply with the existing matrix (and generalize a lot more), this is just an example.
Also, the game will immediately overwrite any change you make to the party's transformation matrix as far as I can tell, so you want to make a new object with a CameraComponent and transform that instead.
Code: Select all
local mat = object:getWorldRotation()
local angle = pi/2
local sin = math.sin(angle)
local cos = math.cos(angle)
mat.x[1] = 1
mat.x[2] = 0
mat.x[3] = 0
mat.y[1] = 0
mat.y[2] = cos
mat.y[3] = sin
mat.z[1] = 0
mat.z[2] = -sin
mat.z[3] = cos
object:setWorldRotation(mat)Also, the game will immediately overwrite any change you make to the party's transformation matrix as far as I can tell, so you want to make a new object with a CameraComponent and transform that instead.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.