RPG user interface

Blitz3D Forums/Blitz3D Programming/RPG user interface

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

trying to get a sprite displayed infront of screen, that stays there when i move turn etc. Code below works except for the pitch, anyone know what I'm doing wrong, I'm a slacker at sin/cos so not sure if that part is wrong, or its somethingelse.

Also is displaying a sprite like that the best way of doing stat and info windows (its basically a HUD for an RPG style game). Thought about using 2d code but believe that is slower, and no fade like using entityalpha.

Any thoughts much appreciated:)



        ; display_status is a sprite 300 x 300 and alpha set to 0.2
	angle# = EntityYaw(playerbox)
	pitch# = EntityPitch(playerbox)
	
	movex# = sin#(angle#)
	movez# = cos#(angle#)
	movey# = sin#(pitch#)

	dispx# = movex# * 1.01
	dispz# = movez# * 1.01
	dispy# = movey# * 1.01

	pointx# = EntityX(playerbox) - dispx#
	pointz# = EntityZ(playerbox) + dispz#
        pointy# = EntityY(playerbox) - dispy#



	positionentity display_status, pointx#, pointy# - playergravity# + 4, pointz#