Page 1 of 1

Beach Puzzle Statue revamp

Posted: Tue Dec 08, 2015 5:25 pm
by Emera Nova
So I'm currently trying to make it so the beach puzzle statue can be used as a surface instead of something that accepts items as it currently does.

Code: Select all

defineObject{
	name = "final_puzzle_statue",
	baseObject = "base_wall_decoration",
	components = {
		{
			class = "Model",
			model = "assets/models/env/forest_statue_pillar_03.fbx",
			offset = vec(0, -1, 0),
			staticShadow = true,
		},
		{
			class = "Clickable",
			offset = vec(-0.02, 1.45, -0.4),
			size = vec(0.6, 0.2, 0.2),
			--debugDraw = true,
		},
		{
			class = "Surface",
			offset = vec(-0.1, 1.37, -0.37),
			rotation = vec(0, 0, -3),
			--debugDraw = true,
		},	
		{
			class = "ItemConstrainBox",
			offset = vec(0, 1.5, 0),
			size = vec(0.9, 3, 0.9),
			--debugDraw = true,
		},
		{
			class = "ProjectileCollider",
			size = vec(1.1, 3, 0.8),
			--debugDraw = true,
		},
	},
	placement = "wall",
}
I thought If I gave it the surface class here it would work but instead if like crashes hard.. Any particular reason why? Is it possible for this object to be turned into something like an alcove? I'm trying to make it so when you walk up you can collect weapons from it.

Re: Beach Puzzle Statue revamp

Posted: Tue Dec 08, 2015 5:47 pm
by Emera Nova

Code: Select all

defineObject{
	name = "final_puzzle_statue",
	baseObject = "base_alcove",
	components = {
		{
			class = "Model",
			model = "assets/models/env/forest_statue_pillar_03.fbx",
			offset = vec(0, -1, 0),
			staticShadow = true,
		},
		{
			class = "Clickable",
			offset = vec(-0.02, 1.45, -0.4),
			size = vec(0.6, 0.2, 0.2),
			--debugDraw = true,
		},
		{
			class = "Occluder",
			offset = vec(-0.1, 1.37, -0.37),
			rotation = vec(0, 0, -3),
		},	
		{
			class = "ItemConstrainBox",
			offset = vec(0, 1.5, 0),
			size = vec(0.9, 3, 0.9),
			--debugDraw = true,
		},
		{
			class = "ProjectileCollider",
			size = vec(1.1, 3, 0.8),
			--debugDraw = true,
		},
	},
	placement = "wall",
}
So I got it to accept me presetting items into it like an alcove.. Sadly it keeps it at the height of the alcove, so now I gotta figure out how to lift it so the items are where the hands are so it looks like its holding them.

Re: Beach Puzzle Statue revamp

Posted: Tue Dec 08, 2015 7:01 pm
by THOM
If you erase the two "--" before debugDraw = true, a box will be drawn which represents the clickable/surface-area. If you cange the values of offset you can place them carefully...