Locking object to a surface
BlitzMax Forums/MiniB3D Module/Locking object to a surface
| ||
Hi All, In essence i create a surface and texture it to look like a sqaure of grass, i then want to place objects on the surface but i want the object i am placing to be locked to the surface as i move it around, or at least as i move the mouse around highlight a piece of the surface, not asking anyone to write it for me but just to point me in right direction, moving a textured sqaure around locked to the surface would be cool :) |
| ||
camerapick() pickeentity() pickedx(), y and z essentially you need to do a camerapick (or a linepick) and place your object at the picked x,y,z coordinates. |
| ||
thx Dude, will try that and how i get on :-) |
| ||
np. if you run into a snag. post a working code snippet and i will try to help. don't forget to make the destination entity poly pickable (entitypickmode) |
| ||
Only pick once to get the coordinates. When they are found, make your object a child of the picked entity with http://www.blitzbasic.com/b3ddocs/command.php?name=EntityParent |