BlitzCoder Essentials
•
Home Page
•
About BlitzCoder
•
Contributors
•
Terms of Use
•
Email Us
Main Areas
•
BlitzCoder Chat
•
Discussions
•
Articles/Tutorials
•
Code Database
•
Link Database
•
Showcase Area
•
Worklogs
•
Competitions
Special Areas
•
Undocumented
Other Blitz Sites
•
Blitz Basic Home
•
Blitz Showcase
•
BlitzPlay Library
Forum Login
Username:
Password:
•
Register Now!
BlitzCoder Code Archives Page
Main Codes Page
"position 3d sprites with 2d co-ords"
, by darkeagle
lets you say "i want bloke A at screen co-ords 400,218. but i want alpha and real time scaling/rotating aswell!.
Code
Graphics3D 800,600 SetBuffer BackBuffer() Global cam = CreateCamera() Global pickcube = CreateCube(cam) EntityPickMode pickcube, 2 ScaleEntity pickcube,-18,-18,-18 EntityAlpha pickcube,0.2 Global sprite = CreateSprite() Global spritetex = CreateTexture(64,64,256) SetBuffer TextureBuffer(spritetex) Color 255,0,0 Rect 0,0,64,64,1 SetBuffer BackBuffer() EntityTexture sprite,spritetex PositionEntity sprite,0,0,10 While Not KeyHit(1) Cls msx = MouseX() msy = MouseY() CameraPick(cam,msx,msy) PositionEntity(sprite, PickedX(),PickedY(),PickedZ()) UpdateWorld RenderWorld Text 10,10,PickedX() Text 10,20,PickedY() Text 10,40,MouseX() Text 10,50,MouseY() Flip Wend
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.
Code software created by Krylar's Kreations