trying to reposition but objects get in the way

Blitz3D Forums/Blitz3D Beginners Area/trying to reposition but objects get in the way

My project has an update routine that is called at regular cycles to make sure entities are synchronised in the exact same place in the world (as movement code alone is not 100% accurately transmitted). Unfortunately the walls, ceilings, and other objects get in the way so the entities can't move through them to get into position, even when I try switching on and off the collision code:

;---------------------------------
;| Update Position & Orientation |
;---------------------------------
Function UpdatePosition( u.User )

	ClearCollisions
	
	PositionEntity u\Entity,u\Pos_X,u\Pos_Y,u\Pos_Z,True
	RotateEntity u\Entity,u\Rot_X,u\Rot_Y,u\Rot_Z,True
	
	Collisions Type_User,Type_Terrain,2,3
	Collisions Type_User,Type_Building,2,3
	Collisions Type_Target,Type_User,2,3
	Collisions Type_Target,Type_Building,2,3

End Function


Can anyone help me? :-\

if you hide your walls and ceilings, using the HideEntity command, then it will ignore them in collision calculations.

or...hide the object you wish to move. move it, then show it again. Save you having to cycle through all your environment objects.

Hmmmmmm thanks, I'll try that :-)

It worked! Thanks a bunch :-)

And if you want to have an object invisible, but still involve with the collisions, perhaps for an event trigger, or a low poly level geometry to block plays moving off the map, then don't hide it, but set its alpha to 0

That way the rendering engine will ignore it, but the collisions system will still pick it up.