Invisible collision meshes flickering

Blitz3D Forums/Blitz3D Programming/Invisible collision meshes flickering

slenkar(Posted 2005) [#1]
I set the entityalpha level to zero for my invisible meshes that I am checking for collisions but they are flickering.
is there another way to get them invisible?
hideentity is no good because it disables collisions


GfK(Posted 2005) [#2]
I'm quite sure this is a problem with render tweening. Check your code for errors.


slenkar(Posted 2005) [#3]
I just copied the code from the castle demo,Ill check that demo to see if the alpha levels mess up,
I removed captureworld() because it causes graphical errors when positioning entities\

EDIT- I tried applying entityalpha to the model and a copy but they didnt respond, they just stayed opaque

Has anyone got any rendertweening code to share?


Damien Sturdy(Posted 2005) [#4]
Well, make sure your captureworld command is being called ;) Alpha gets disabled when you rendertween 0 without calling it ;)

Theres no point in tweening if you dont want to call Captureworld. Just use frame limiting :). Captureworld is the command that stores the point to start tweening from.


slenkar(Posted 2005) [#5]
oh.....
Well I was using it before and my entities would go back and forth when I was only telling them to go forwards,(graphical error)

maybe I was doing something wrong...

Well thanks CYG and GFK you have probably set me on the right path to finding the problem

If I just use Frame limiting will I still get the same benefits?


Damien Sturdy(Posted 2005) [#6]
Well, the game will be a constant framerate and if your cpu/gfx usage isnt rediculous you should be able to keep at 60fps.

i do simple routines to skip a frame if too much time passed...

An earlier idea of mine, you might be able to upgrade.


timer=1000/fps#
repeat
for gameupdate=1 to skipframes
;do stuff.
updateworld  ;This must be in here to stop collision errors.
next

Renderworld 0
flip
repeat:skipframes=(millisecs()-lasttimer)/timer:until skipframes>1
until keydown(1)


basically, figure out how many milliseconds you need to use for the game to run at <n> FPS. Wrap your game loop in a for/next loop, Find out how many frames have passed after, or wait for one frame to pass...
then go back up to the for/next loop again.

I personally just this week finally got my head around tweening. I wrote a simple renderworldtween(fps) function but it was buggy. Now i know what i am doing i will re-write it soon.


slenkar(Posted 2005) [#7]
I cant seem to get render-tweening
,but I noticed that if I put captureworld in there it solved the problem I was having originally, (Thanks)
but the graphicaL errors with positioning entities still occur,
if I remove tweening the problem is also solved, but I dont know if I will need it later on