Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / how to position render plane object directly infront of camera and at the same size and aspect

Author
Message
haliop_New
User Banned
Posted: 16th Jul 2015 21:22
i have tried the search but didnot find anything...

any ideas ?



thank you for your time.
haliop.
Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 16th Jul 2015 21:53 Edited at: 16th Jul 2015 21:54
maybe this help you
Get3DVectorXFromScreen
Get3DVectorYFromScreen
Get3DVectorZFromScreen

GetScreenXFrom3D
GetScreenYFrom3D

GetVirtualHeight
GetVirtualWidth

AGK 108 (B)19 + AppGameKit (Steam) V2 Beta .. : Windows 8.1 Pro 64 Bit : AMD Radeon R7 265 : Mac mini OS X 10.10 (Yosemite)
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 17th Jul 2015 10:48
Why not render to an image and create a sprite using that image? Then you can make the sprite any size you want. Please be aware that render images are required to be power of two in size on Android and possibly other platforms so what you make on Windows may not work on mobile without some tweaks.

Using AppGameKit V2 Tier 1
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 17th Jul 2015 12:11
The default render quad object does exactly that for you already, is there any reason why you cant use that?

haliop_New
User Banned
Posted: 17th Jul 2015 13:24
what default render quad ?! ?! ?! ?

i created a 3d plane object
at sizes of : DeviceWidth/100 and DeviceHEight/100
then i moved it along the localZAxis of it and its ok ...

but what default render quad ?
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 17th Jul 2015 13:33
This is from the space demo user project:



haliop_New
User Banned
Posted: 17th Jul 2015 16:09
thank you !
haliop_New
User Banned
Posted: 17th Jul 2015 16:12
wow nice i got from 1300 fps to 1500 fps with the default quad

thank you.
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 17th Jul 2015 16:13
No problem. Thank Paul, he made it

Login to post a reply

Server time is: 2024-11-16 18:19:56
Your offset time is: 2024-11-16 18:19:56