Anmiated character control..

Blitz3D Forums/Blitz3D Programming/Anmiated character control..

Naughty Alien(Posted 2008) [#1]
..well..I know that updateworld, do fancy things by updating all animated objects on scene, so, what i want to do is to exclude some of them from UpdateWorld, since they are not visible or whatever reason may be..I just want to exclude them from Updating, since im experiancing slow down because of number of characters I do have but actually cant see them from given position...so..how to enable/disable it from updating??


EmerGki(Posted 2008) [#2]
I do it inside of my AI function, in the most simple way.. Using EntityInView, so, I just animate the characters what are in View.


Naughty Alien(Posted 2008) [#3]
..but once you set up Animate Character, its always updated when Updateworld is called, and I want to avoid that..I want my character to be outside of UpdateWorld , based on any conditions I set up...so, is there a way to do that?


Yo! Wazzup?(Posted 2008) [#4]
Just an idea from the top of my head but...
Could you save the x,y positions of the character then get rid of it, then later make it show again?


IPete2(Posted 2008) [#5]
Naughty,

You are correct - unless you do it manually by using only the SetAnimTime entity,time#[,anim_seq] commands instead of the automatic ones.

Of course this means you have to control everything else manually too - e.g. looping animations will have to be manually coded, but I am sure a man of your calibre can handle that sort stuff...


IPete2.


Naughty Alien(Posted 2008) [#6]
ggeezz...it means everything I did, regarding control over animated sequences, must be redone..uh...I was hoping for some nice flag what will save me byt enabling/disabling automatic UpdateWorld over some animated chars...


GfK(Posted 2008) [#7]
Use UpdateWorld(0) if you don't want the animation to be updated.


Naughty Alien(Posted 2008) [#8]
but I cant..some of the characters muct be updated(visible), and some dont...


GfK(Posted 2008) [#9]
In that case you have a couple of options.

1. Animate myHiddenEntity,0 (stop the animation)
2. Animate all your entities manually with SetAnimTime.


Dreamora(Posted 2008) [#10]
Or hide all entities that shall not be updated before calling update world, showing them again after that.


IPete2(Posted 2008) [#11]
@Dreamora Ohh that's sneaky (a clever and simple solution) Dreamora - will that do the job?

@ Naughty here is a thought,

That first option GFK came up with maybe the easiest way forwards I reckon. Otherwise can you use your already - many hours worked on - code to 'feed' the manual method? So use all the controlled stuff you have to tell the setanimtime what to do and when?

Its horrid when you have to redo stuff - I hate that. As hide entity prevents collision calculation, maybe it will speed things up if you hide them when these animating entities are not in view?

IPete2.


Dreamora(Posted 2008) [#12]
HideEntity disables all updates. Animation, Collision etc.
It does not exist "physically" in that frame (ie the last updateworld to this one) but can still exist graphically as renderworld works independent of updateworld.

thats a neat trick to reduce the detail calculation overhead of B3D terrains as well.
Learned it from a german community member.


IPete2(Posted 2008) [#13]
Nice....

IPete2.


Ross C(Posted 2008) [#14]
Interesting that.


jfk EO-11110(Posted 2008) [#15]
Once called a bug, it now became a powerful feature.