Anmiated character control..
Blitz3D Forums/Blitz3D Programming/Anmiated character control..
| ||
..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?? |
| ||
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. |
| ||
..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? |
| ||
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? |
| ||
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. |
| ||
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... |
| ||
Use UpdateWorld(0) if you don't want the animation to be updated. |
| ||
but I cant..some of the characters muct be updated(visible), and some dont... |
| ||
In that case you have a couple of options. 1. Animate myHiddenEntity,0 (stop the animation) 2. Animate all your entities manually with SetAnimTime. |
| ||
Or hide all entities that shall not be updated before calling update world, showing them again after that. |
| ||
@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. |
| ||
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. |
| ||
Nice.... IPete2. |
| ||
Interesting that. |
| ||
Once called a bug, it now became a powerful feature. |