Game Development Community

World point to screen. How to?

by Thomas Davey · in Torque Game Engine · 08/15/2011 (12:28 am) · 4 replies

Hello everyone.

I'm after a solution to an issue in regards to aiming. And what I have in mind it for the muzzlepoint of the weapon to raycast forwards every frame, and set the aiming reticule to where ever it hit.

anyone know how to do this? I can do it in Unity, but this is Torque....

#1
08/15/2011 (2:01 am)
Check out GuiTSCTrl::project. Basically do a

%screenPos = PlayGui.project( %rayCastHit );
#2
08/15/2011 (4:43 am)
Have a look at this, it basically does exactly what you want. If you want to make your own this is a good place to start.

[link]http://www.garagegames.com/community/blogs/view/3533[link]
#3
08/15/2011 (4:44 am)
Sorry,

[url]http://www.garagegames.com/community/blogs/view/3533[url]