ResetEntity
Blitz3D Forums/Blitz3D Programming/ResetEntity
| ||
Hi there, Do you know: a) When we use the ResetEntity command? b) Does this command affects the collision state of the parent entities also? [Edit: and the childs?] Thanks |
| ||
a) If you want to move an entity from one side of the level to the other (warp) without colliding it to everything in between. b) Not sure, but I'm sure it is easy enough to test it ? |
| ||
Thanks b32, but I don't know how I can do this test because I don't know what happen to an entity when you reset it and how long it takes this resetting |
| ||
This is from on-line help: 'ResetEntity' is the command to use when you want to reposition a collision enabled entity without it being stopped by the first object it encounters that it is enabled to collide with. Just use 'ResetEntity' immediately after the positioning command (it can actually be used anywhere between the positioning command and the 'UpdateWorld' command) and the collision data for the entity will be reset, fooling the collision system into thinking that the entity was already at the new position, and had not been moved. Very useful when you want to teleport game characters and items, for example. Barney |
| ||
Here is how I would test it: It seems that child entities are not reset. However, you could write a function that does that: Function iResetEntity(mesh) ResetEntity mesh For i = 1 To CountChildren(mesh) iResetEntity GetChild(mesh, i) Next End Function |
| ||
I think Blitz3D's power lies into its community Thank you very much! |