Crows don't fly?
Crows don't fly?
I've placed a number of ambient creatures and all the others work fine, but some of the crows just hang in the air without moving. They sometimes fly for a short distance, but then stop again. I've got them all set to elevation 2 or 3. What's causing this?
Re: Crows don't fly?
probably because of performance, you can set distance on which the animation will be "triggered", you can modify it as you wish. Also in real life, if some small object is far away on horizon, you can see it as staying on one place, but it is moving in reality 
defineObject{
name = "crows_flying",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "assets/models/monsters/crow.fbx",
castShadow = true,
--dissolveStart = 2,
--dissolveEnd = 4,
},
{
class = "Animation",
animations = {
sway = "assets/animations/monsters/crow/crow_circle_fly.fbx",
},
playOnInit = "sway",
loop = true,
maxUpdateDistance = 10,
},
},
editorIcon = 252,
}
edit:
also some other interesting animation hooks you can try use
AnimationComponent:getCurrentLevelOnly() Get whether animation component is updated only when party is on the same level
AnimationComponent:getLoop() Get looping for initial animation
AnimationComponent:getMaxUpdateDistance() Get max update distance in squares
AnimationComponent:getPlayOnInit() Get name of the initial animation to be played when the object is spawned
AnimationComponent:setCurrentLevelOnly(boolean) Set whether animation component is updated only when party is on the same level
AnimationComponent:setLoop(boolean) Set looping for initial animation
AnimationComponent:setMaxUpdateDistance(number) Set max update distance in squares
AnimationComponent:setPlayOnInit(string) Set name of the initial animation to be played when the object is spawned
AnimationComponent:stop()
AnimationComponent.onAnimationEvent(self, event)
defineObject{
name = "crows_flying",
baseObject = "base_floor_decoration",
components = {
{
class = "Model",
model = "assets/models/monsters/crow.fbx",
castShadow = true,
--dissolveStart = 2,
--dissolveEnd = 4,
},
{
class = "Animation",
animations = {
sway = "assets/animations/monsters/crow/crow_circle_fly.fbx",
},
playOnInit = "sway",
loop = true,
maxUpdateDistance = 10,
},
},
editorIcon = 252,
}
edit:
also some other interesting animation hooks you can try use
AnimationComponent:getCurrentLevelOnly() Get whether animation component is updated only when party is on the same level
AnimationComponent:getLoop() Get looping for initial animation
AnimationComponent:getMaxUpdateDistance() Get max update distance in squares
AnimationComponent:getPlayOnInit() Get name of the initial animation to be played when the object is spawned
AnimationComponent:setCurrentLevelOnly(boolean) Set whether animation component is updated only when party is on the same level
AnimationComponent:setLoop(boolean) Set looping for initial animation
AnimationComponent:setMaxUpdateDistance(number) Set max update distance in squares
AnimationComponent:setPlayOnInit(string) Set name of the initial animation to be played when the object is spawned
AnimationComponent:stop()
AnimationComponent.onAnimationEvent(self, event)