PositionEntity Slides?

Blitz3D Forums/Blitz3D Programming/PositionEntity Slides?

BODYPRINT(Posted 2004) [#1]
Can anybody tell me how to make PositionEntity an instant command, because it seems to really slide to the position.

This is annoying for fast changes.

Is this only happening because I am tweening?

Would increasing my Target FPS in the tween setup help this problem?

Your wisdoms are greatly appreciated :-)


Damien Sturdy(Posted 2004) [#2]
you need to hide the entity until it reaches its destination. Unfortunately, theres no way to "disable" tweening of a certain object. A missing feature, IMO.


aab(Posted 2004) [#3]
Yeah, i think it does do this in some way:
in positioning a colliding bullet in the barrel of the gun in a game, it collided during position entity, with the walls inbetween 0,0,0 and the gun: which meant that it couldnt be done with a colliding bullet, even though the collission type was declared after the positionentity (ie: collissions are taken simultaneously with movement in Update World which means that due to the sliding taking place the collissions stop the bullet appearing from the gun)==>collission type had to be declared a 'frame' after the positionentity.
this was withought tweening: so i couldnt see the bullet as it slid, just that it could be noticed that it done so .With tweening, it would update less in that way so i imageine your right, and increasing the updates fps would help


IPete2(Posted 2004) [#4]
Cygnus may be right, hide the entity so collisions have no effect.

Perhaps you could also position the object in the modeller relative to where it will be in the world, so when you load it, it is already in position.

So if you are positioning it to x=234 y=15 z=2000 (x,y,z positions) export it from the modeller in that position, maybe it will instantaneously appear where you want it.

Of course thats no good for moving objects or things created directly in Blitz.

Sorry if that's not really too much help.

Hmm. would using translate do the job better?

IPete2.


_PJ_(Posted 2004) [#5]
PositionEntity will reposition the entity, however collisions are still calculated for that entity.

'Ang on two tiks and Ill find the answer for ya...


_PJ_(Posted 2004) [#6]
You can 'Reset' collisions for that entity whilst it is re-positioned,
you can use the no-response collisoin thingy in the archives or./..

you can ignore all this, cos I think Ive just misunderstood your original problem ;-)


John Blackledge(Posted 2004) [#7]
After lots of tests, no question: You must HideEntity, PositionEntity, ShowEntity.


BODYPRINT(Posted 2004) [#8]
OK, thanks guys.

It's not really the collision thats the problem. I'm doing collision checks via software position checks.

If the hiding entity doesn't work I might try to create a new instance of the object at the new position and delete the old one.


BODYPRINT(Posted 2004) [#9]
Well it's all poo !!

If I hide the entity for 5 frames, when I do a showentity it still slides there from the old position.

If I remake the entity, it slides from the creation point to the position.

The only way I can see this working is a 5 step process.
1. Move the entity under the ground.
2. Wait a few frames for it to get there
3. Move the entity to it's new position except for the height.
4. Wait a few frames...
5. Move the entity back up above the ground.

I think I'll go have a beer!! Who wants to join me? :-)


IPete2(Posted 2004) [#10]
Phil74,

Perhaps you can renderit the entity first by swapping the entityorder? This way when it is drawn it will be overwritten by whatever is drawn next and covers it (i.e. the ground...

This means you wont have to move it underground. :)

Have a play and tell us your findings!

IPete2.


BODYPRINT(Posted 2004) [#11]
Ipete !! Brilliant.

Works great. I set it's order to 1 for 5 frames and it works perfect.

Thanks heaps :-)


Ziltch(Posted 2004) [#12]
What about TranslateEntity?


BODYPRINT(Posted 2004) [#13]
TranslateEntity has the same problem. I tried it!!